How to include validation annotation's attribute into validation message?
There are snapshots from my application below:
Form Object:
validation.properties:...
@Size(min = 6)
private String password;
...
Without {min} message is displayed successfully on the page, if {min} is included I get:Size.password = Password should be at least {min} characters
The key word here is "number". If I write Size.password = Password should be at least {2} characters, actually it works, and min value will be displayed (I found this arg number during inspecting BindingResult object after validation is applied in my controller). But this is weird.Caused by: java.lang.IllegalArgumentException: can't parse argument number min
What is right configuration for spring web mvc project to able support for validation annotation attribute's values in the message source?
Thank you.


Reply With Quote
