diff --git a/src/FormElement/BaseFormElement.php b/src/FormElement/BaseFormElement.php index 617c9ed6..08b8d733 100644 --- a/src/FormElement/BaseFormElement.php +++ b/src/FormElement/BaseFormElement.php @@ -243,17 +243,8 @@ public function setValue($value) */ public function validate() { - $valid = true; - - foreach ($this->getValidators() as $validator) { - if (! $validator->isValid($this->getValue())) { - $valid = false; - - $this->addMessages($validator->getMessages()); - } - } - - $this->valid = $valid; + $this->valid = $this->getValidators()->isValid($this->getValue()); + $this->addMessages($this->getValidators()->getMessages()); return $this; }