2

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.

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134
user741701
  • 33
  • 3

3 Answers3

2

For a property foo, the following should override the default message:

typeMismatch.java.math.BigDecimal.foo=Property {0} must be a valid number
Dónal
  • 185,044
  • 174
  • 569
  • 824
  • typeMismatch.java.math.BigDecimal.amount = Amount value is invalid. does not work for me. Do i need to specify the class name the property belongs to. – user741701 May 18 '11 at 13:30
0

For a property foo:

typeMismatch.foo=Custom message

Or more specific, for a property foo in a form:

typeMismatch.formName.foo=Custom message

Jules
  • 14,200
  • 13
  • 56
  • 101
Lorna2000
  • 1
  • 1
0

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

Stephen Tun Aung
  • 982
  • 9
  • 18