I Provide a question in [here]
: Spring MVC form validation but unfortunately I was not able to solve the problem completely !
my problem is when I submit a wrong value to form (select element) the default error of Spring just show up:
Failed to convert property value of type java.lang.String to required type tm.sys.validator.AgentState for property state; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type java.lang.String to type @javax.validation.constraints.NotNull tm.sys.validator.AgentState for value ACTIVE3; nested exception is java.lang.IllegalArgumentException: No enum constant tm.sys.validator.AgentState.ACTIVE3
how I can make my custom handler message because this one is so weird and my client can abuse it.
note that I use some validators as well and I also check BindingResult methods and I could not find a setter to overwrite the message !
and one more inportant thing is if it doesn't pass through it how the page get redirected back to it's own & show the messages ? It's just because of the return value which I do provide inside my if(dataBinderObject.hasError()) – Mehdi Mar 18 '13 at 20:27