original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Validates a value via the given rules .