Reputation: 33
I want to change the default message for typemismatch.java.math.BigDecimal
in i18 message properties file for different properties.
In the documentation it says, use typeMismatch.$className.$propertyName
to customize but that does not work for me.
Did anyone come across this issue. Any help is appreciated.
Upvotes: 2
Views: 682
Reputation: 992
To override the default message, you need fully qualified class name at $className
of documentation typeMismatch.$className.$propertyName
.
Eg. typeMismatch.com.xxx.hrms.Employee.salary=Please Enter valid number
Upvotes: 0
Reputation: 1
For a property foo
:
typeMismatch.foo=Custom message
Or more specific, for a property foo in a form:
typeMismatch.formName.foo=Custom message
Upvotes: 0
Reputation: 187529
For a property foo
, the following should override the default message:
typeMismatch.java.math.BigDecimal.foo=Property {0} must be a valid number
Upvotes: 2