I try to validate an input date to have format dd/MM/yyyy like that :
<input type="date" th:pattern="${date_format}" th:field="*{subscriptionDate}"/>
In my controller, I add an attribute to my model like that :
model.addAttribute("date_format", "dd/MM/yyyy");
But when I submit my form I have this message from my input tag :
Please respect the format
Aucun commentaire:
Enregistrer un commentaire