Added a 'post validation' event to the form component.
This commit is contained in:
parent
4c1cea7093
commit
e6577debf6
@ -566,6 +566,9 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
foreach ($this->validators as $validator) {
|
||||
$validator->validate($this);
|
||||
}
|
||||
|
||||
$event = new DataEvent($this, $clientData);
|
||||
$this->dispatcher->dispatch(FormEvents::POST_VALIDATE, $event);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
@ -29,4 +29,6 @@ final class FormEvents
|
||||
const BIND_NORM_DATA = 'form.bind_norm_data';
|
||||
|
||||
const SET_DATA = 'form.set_data';
|
||||
|
||||
const POST_VALIDATE = 'form.post_validate';
|
||||
}
|
||||
|
Reference in New Issue
Block a user