The default field error message in struts 2 is Invalid field value for field "[fieldName]".
To override this message you need to create a property file with a file name pattern [ClassName].properties under the package of the Action class.
To override this message you need to create a property file with a file name pattern [ClassName].properties under the package of the Action class.
If you are getting error message like : Invalid field value for field "birthDate". You can override this by adding a line in properties file like,
invalid.fieldvalue.birthDate = Birthdate is invalid
So now your message is : "Birthdate is invalid"
Good research man!!!
ReplyDeleteI m not sure about it but the last time i tried it gave message "Invalid field value for birthdate is invalid" :(, but may be because i tried in common properties file.
Thats y dude...
ReplyDeleteWe have tried this and its working.
This comment has been removed by the author.
ReplyDelete