Beispiel #1
0
 /**
  * @param mixed $value
  *
  * @return bool
  */
 public function validate($value)
 {
     /** @var AbstractValidation $validation */
     foreach ($this->validations as $validation) {
         $validation->validate($value);
         $this->errorStack->merge($validation->getErrorStack());
     }
     return !$this->errorStack->hasErrors();
 }
 /**
  * @return bool
  */
 protected function hasErrors()
 {
     return !empty($this->errors) && $this->errors->hasErrors();
 }
Beispiel #3
0
 /**
  * @return bool
  */
 public function hasErrors()
 {
     return $this->errorStack->hasErrors();
 }