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

Set errors
public setErrors ( array $errors ) : void
$errors array
Результат void
Пример #1
0
 /**
  * Assert
  *
  * @param  mixed $input
  * @return bool
  * @throws ValidatorException
  */
 public function assert($input)
 {
     if (!$this->validate($input)) {
         $exception = new ValidatorException();
         $exception->setErrors($this->getErrors());
         throw $exception;
     }
     return true;
 }