The "stock" validators provide default error messages. To override the default message,
- create or edit a global resource bundle, and
- add an entry corresponding to the field
The "message prefix" is invalid.fieldvalue
. To create a message entry, append the field name to the prefix. For example, a field named user.dob
would use the entry invalid.fieldvalue.user.dob
.
Code Block | ||||
---|---|---|---|---|
| ||||
|
...
invalid.fieldvalue.user.dob=Please enter Date of Birth in the correct format. |