AFAIK there is no Framework supported way to do validation before binding the request parameters to the command object.
However this would be useful.
Consider following situation:
- command object with a java.util.Date property
- date format should be dd/mm/yyyy
I have configured a CustomDateEditor to parse such a submitted string into the Date property of my command object. If the submitted string is not correctly formatted, the exception thrown appears in my view (yuck).
I think there is a way to show this message in a cleaner way.
BUT, I would like to have some validator (like the commons-validator does now after the binding) that takes a look at the inputs ('is the date string in the format that the binder expects ?') before the binding occurs (similar like client-side validation, but now server-side).
Any ideas / comments ?


Reply With Quote