test person's edit form

update the controller to get the validation
This commit is contained in:
2015-01-27 22:17:39 +01:00
parent 58d05123bb
commit 5992977a3e
3 changed files with 289 additions and 1 deletions

View File

@@ -92,7 +92,10 @@ class PersonController extends Controller
if ($request->getMethod() === 'POST') {
$form->handleRequest($request);
if ( ! $form->isValid() ) {
$errors = $this->get('validator')
->validate($person, array('general'));
if ( count($errors) > 0 ) {
$errors = $form->getErrorsAsString();