src/Util/Validator.php
protected function hasRule(string $name, string $field): bool
    {
        foreach ($this->_validations as $validation) {
            if ($validation['rule'] === $name && \in_array($field, $validation['fields'], true)) {
                return true;
            }
        }

        return false;
    }
protected function hasRule(string $name, string $field): bool
    {
        foreach ($this->_validations as $validation) {
            if ($validation['rule'] === $name && \in_array($field, $validation['fields'], true)) {
                return true;
            }
        }

        return false;
    }
protected function hasRule ( string $ name , string $ field ) : bool { foreach ( $ this -> _validations as $ validation ) { if ( $ validation [ 'rule' ] === $ name && \ in_array ( $ field , $ validation [ 'fields' ] , true ) ) { return true ; } } return false ; }
Determine whether a field is being validated by the given rule.

@param  string $name  The name of the rule
@param  string $field The name of the field

@return bool
Determine whether a field is being validated by the given rule .