-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rendre obligatoire les champs required du message
Ce commit corrige une combinaison de deux problèmes qui fait qu'un message pouvait être validé sans aucun champs de remplis (causant une ou des erreurs côté backend). - Au niveau de JS le form n'était pas validé avant l'envoi - Au niveau de ChoicesJS, le champ initial est bien required mais masqué complétement par la bibliothèque (display: none !important) ce qu'il fait qu'il ne rentre pas en compte dans la validation du formulaire. Pour corriger le deuxième problème j'ai opté pour une méthode de masquage différente qui garde le champ actif mais le cache de l'affichage, il est ainsi consévé dans la validation. Ce changement de comportement oblige a beaucoup de changement dans les tests pour être sur de sélectionner la bonne option. Choices-js/Choices#1061
- Loading branch information
Showing
4 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters