/** * @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(); }