-1
Ich versuche, ein Eingabedatum zu validieren Format TT/MM/yyyy wie das haben:thymeleaf Muster dd/MM/yyyy
<input type="date" th:pattern="${date_format}" th:field="*{subscriptionDate}"/>
In meinem Controller, füge ich ein Attribut zu meinem Modell wie folgt aus:
model.addAttribute("date_format", "dd/MM/yyyy");
Aber wenn ich mein Formular habe ich diese Nachricht von meinem Input-Tag:
Bitte beachten Sie das Format
Das Muster-Attribut erwartet einen regulären Ausdruck, übrigens https://html.spec.whatwg.org/multipage/forms.html#the-pattern-attribute –