Added a 'post validation' event to the form component.

This commit is contained in:
root 2012-03-01 09:41:17 +01:00
parent 4c1cea7093
commit e6577debf6
2 changed files with 5 additions and 0 deletions

View File

@ -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;
}

View File

@ -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';
}