re: how to invoke both,
October 31, 2008 at 8:37 PM
I have written a two Custom Validators to say validate the zipCode and email separately. And I am validating other form properties say firstname, lastname in the Forms validate() method. I have defined the zipCode and email validation under validation.xml file and then overwrite Form.validate() method in the ActionForm for validating other properties (firstname, lastname). If now I want to invoke validations for all propeties except say email, I am finding out that I cannot invoke both validations at the sametime, it will just call the Form.validate(). It will not call my custom validations for zipCode and email. The only way to invoke the CustomValidator is by calling super.validate(). If I call super.validate() then it will call both email and zipCode validations and I don't want to call email validation at all, just zipCode. How do I do that without calling super.validate().
View All Comments
| View Tutorial