Get invalid user input with a Spring typeMismatch error
Posted
by TimmyJ
on Stack Overflow
See other posts from Stack Overflow
or by TimmyJ
Published on 2010-05-06T18:21:30Z
Indexed on
2010/05/06
18:28 UTC
Read the original article
Hit count: 267
spring-mvc
|databinding
I've implemented a ReloadableResourceBundleMessageSource in my Spring MVC application which I use to display prettier error messages for binding exceptions. The problem I'm having is that, due to a company policy, these errors must be displayed in the following format:
[inputData] is not a valid [fieldName].
The field name is accessible by default in my message properties file (as the {0} argument), but I can't figure out a way to display the invalid user input. Is this possible?
© Stack Overflow or respective owner