… to ensure that they are always executed after the form field’s
internal validation (which could not be guaranteed due to inheritance).
See #2545
}
$child->validate();
+
+ if ($child instanceof IFormField && empty($child->getValidationErrors())) {
+ foreach ($child->getValidators() as $validator) {
+ $validator($child);
+
+ if (!empty($child->getValidationErrors())) {
+ break;
+ }
+ }
+ }
}
}
}
* @inheritDoc
*/
public function validate() {
- if (empty($this->getValidationErrors())) {
- foreach ($this->getValidators() as $validator) {
- $validator($this);
-
- if (!empty($this->getValidationErrors())) {
- break;
- }
- }
- }
+ // does nothing
}
}