Home > FAQs > How do I change the invalid input error message for a particular field |

Apache Struts 2 Documentation
How do I change the invalid input error message for a particular field
Edit Page Browse Space Add Page Add News

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`.