validate() публичный Метод

Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.
public validate ( mixed $value ) : Neos\Error\Messages\Result
$value mixed The value that should be validated
Результат Neos\Error\Messages\Result
Пример #1
0
 /**
  * Sets the value of this argument.
  *
  * @param mixed $rawValue The value of this argument
  * @return Argument $this
  */
 public function setValue($rawValue)
 {
     if ($rawValue === null) {
         $this->value = null;
         return $this;
     }
     if (is_object($rawValue) && $rawValue instanceof $this->dataType) {
         $this->value = $rawValue;
         return $this;
     }
     $this->value = $this->propertyMapper->convert($rawValue, $this->dataType, $this->getPropertyMappingConfiguration());
     $this->validationResults = $this->propertyMapper->getMessages();
     if ($this->validator !== null) {
         $validationMessages = $this->validator->validate($this->value);
         $this->validationResults->merge($validationMessages);
     }
     return $this;
 }