My thymeleaf code:
Your favorite number: <input type="text" th:field="*{xy}"/>
My messages.properties:
required={0} is required
typeMismatch.java.lang.Integer={0} is not a number
When the user doesn’t fill this field, or types bad data, this message has displayed automatically:
xy is required
or
xy is not a number
But I would like to set the field name „Your favorite number” instead of „xy”, so I would like to display these messages when error:
Your favorite number is required
or
Your favorite number is not a number
How can I set field name for {0}
?