The easiest way to do this may be to chain validators. Use Commons Validator's "beanValidator" for required fields and such, then create a class that implements Spring's Validator and do more rigorous validation there.
On your FormController, you can change from using "validator" to "validators" and specify a <list> of validators. Matt On 9/9/07, Aled Rhys Jones <[EMAIL PROTECTED]> wrote: > Hi all > > I need to validate some fields only if the user has specific roles. How do > I do this? > For example, I don't want to force the user to have to specify a country > unless they're an administrator. > > I've had a look at requiredIf and validwhen, I think requiredIf is now > depricated. > I'm not sure validwhen is what I'm looking for. > > I'm using Spring MVC. > > Thanks > Aled > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://raibledesigns.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
