src/Valitron/Validator.php
/**
     * 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 boolean
     */
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 boolean
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 boolean
protected function hasRule($name, $field)
    {
        foreach($this->_validations as $validation) {
            if ($validation['rule'] == $name) {
                if (in_array($field, $validation['fields'])) {
                    return true;
                }
            }
        }
        return false;
    }
protected function hasRule ( $ name , $ field ) { foreach ( $ this -> _validations as $ validation ) { if ( $ validation [ 'rule' ] == $ name ) { if ( in_array ( $ field , $ validation [ 'fields' ] ) ) { return true ; } } } return false ; }
Determine whether a field is being validated by the given rule.
Determine whether a field is being validated by the given rule .