mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
test person's edit form
update the controller to get the validation
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user