diff options
Diffstat (limited to 'src/controller/ContactFormController.php')
| -rw-r--r-- | src/controller/ContactFormController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller/ContactFormController.php b/src/controller/ContactFormController.php index e078af2..82e9b17 100644 --- a/src/controller/ContactFormController.php +++ b/src/controller/ContactFormController.php | |||
| @@ -38,7 +38,7 @@ class ContactFormController | |||
| 38 | return new JsonResponse(['success' => true]); | 38 | return new JsonResponse(['success' => true]); |
| 39 | } | 39 | } |
| 40 | else{ | 40 | else{ |
| 41 | return new JsonResponse(['success' => false, 'error' => $form->getErrors()[0]]); // la 1ère erreur sera affichée | 41 | return new JsonResponse(['success' => false, 'error' => $form->getError()]); |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
| 44 | 44 | ||
| @@ -60,7 +60,7 @@ class ContactFormController | |||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | else{ | 62 | else{ |
| 63 | $error = $form->getErrors()[0]; // la 1ère erreur sera affichée | 63 | $error = $form->getError(); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | if(empty($error)){ | 66 | if(empty($error)){ |
