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 cbc1837..e078af2 100644 --- a/src/controller/ContactFormController.php +++ b/src/controller/ContactFormController.php | |||
| @@ -28,7 +28,7 @@ class ContactFormController | |||
| 28 | } | 28 | } |
| 29 | static public function setEmailParam(EntityManager $entityManager, array $json): JsonResponse | 29 | static public function setEmailParam(EntityManager $entityManager, array $json): JsonResponse |
| 30 | { | 30 | { |
| 31 | $form = new FormValidation($json, 'email_params'); | 31 | $form = new FormValidation($json, ValidationStrategy::EmailParam); |
| 32 | 32 | ||
| 33 | if($form->validate()){ | 33 | if($form->validate()){ |
| 34 | $form_data = $entityManager->find(EmailForm::class, $json['id']); | 34 | $form_data = $entityManager->find(EmailForm::class, $json['id']); |
| @@ -45,7 +45,7 @@ class ContactFormController | |||
| 45 | // les deux méthodes suivantes sont "factorisables", elles ne se distinguent que par la gestion ou non du formulaire rempli par le visiteur | 45 | // les deux méthodes suivantes sont "factorisables", elles ne se distinguent que par la gestion ou non du formulaire rempli par le visiteur |
| 46 | static public function sendVisitorEmail(EntityManager $entityManager, array $json): JsonResponse | 46 | static public function sendVisitorEmail(EntityManager $entityManager, array $json): JsonResponse |
| 47 | { | 47 | { |
| 48 | $form = new FormValidation($json, 'email_send'); | 48 | $form = new FormValidation($json, ValidationStrategy::EmailSend); |
| 49 | 49 | ||
| 50 | $error = ''; | 50 | $error = ''; |
| 51 | if($form->validate()){ | 51 | if($form->validate()){ |
