3

I am using spring 2.5 framework and i need to get Double value as input. When i want to validate the Double value with type mismatch error. So i add, typeMismatch.java.lang.Double= General error message.

Assume, my command class is SearchInfo.java with Double type property "amount". I want to add specific error message to amount field.

Lan
  • 703
  • 1
  • 7
  • 12

1 Answers1

5

I found the answer to above question of my.

Assume your command name is searchInfo, then you can add field specific type mismatch error by adding following property into application property file.

typeMismatch.searchInfo.amount=Amount must be a valid number.

Lan
  • 703
  • 1
  • 7
  • 12