I am working with my form in spring + thymeleaf and I am wondering if there is a way to simplify an error message for date field as when the value is wrong I get this:
Instead I would like to simply have a text saying: You can't be born yet, or something like that.
Model:
@DateTimeFormat(pattern = "dd.mm.yyyy")
@Past
private Date dob;
Form:
Date: <input type="date" th:field="*{dob}" />
<p th:if="${#fields.hasErrors('dob')}" th:errors="*{dob}"></p>
Thanks for any help!