public function isValidValue($rules, $value) {
        $result = [];
        foreach ($rules as $rule) {
            $parameters = $rule;
            $name       = array_shift($parameters);
            $valid      = $this->isValidRule($name, $parameters, $value);
            if ($valid !== null) {
                $result[] = $valid;
            }
        }
        return $result;
    }
public function isValidValue($rules, $value) {
        $result = [];
        foreach ($rules as $rule) {
            $parameters = $rule;
            $name       = array_shift($parameters);
            $valid      = $this->isValidRule($name, $parameters, $value);
            if ($valid !== null) {
                $result[] = $valid;
            }
        }
        return $result;
    }
public function isValidValue ( $ rules , $ value ) { $ result = [ ] ; foreach ( $ rules as $ rule ) { $ parameters = $ rule ; $ name = array_shift ( $ parameters ) ; $ valid = $ this -> isValidRule ( $ name , $ parameters , $ value ) ; if ( $ valid !== null ) { $ result [ ] = $ valid ; } } return $ result ; }
Validates a value via the given rules.

@param array $rules
the validation rules
@param string $value
the value to validate

@return string[]
the fields where the validation failed
Validates a value via the given rules .