Skip to content

Commit

Permalink
BaseFormElement: Respect recent ValidatorChain changes
Browse files Browse the repository at this point in the history
This is the only change dependent upon: Icinga/ipl-validator#26
  • Loading branch information
nilmerg committed Mar 13, 2023
1 parent 6716c1d commit 8f0288b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FormElement/BaseFormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ public function validate()
$this->setMessages([$this->translate('This field is required.')]);
$this->valid = false;
} else {
$this->valid = $this->getValidators()->isValid($this->getValue());
$this->setMessages($this->getValidators()->getMessages());
$result = $this->getValidators()->validate($this->getValue());
$this->setMessages($result->getMessages());
$this->valid = $result->isValid();
}

return $this;
Expand Down

0 comments on commit 8f0288b

Please sign in to comment.