Well, I'm not exactly an expert on validator, but I just figured out the
answer to this question myself a couple days ago.  I'm using Struts, and
Struts valdiation uses commons validator.  Struts has its own plugin
validators, which explicitly check GenericValidator.isBlankOrNull() on the
field, and ignore the field if true.

I have followed the pattern in my plugin validators.

        Gary

[2003-09-10 23:21 +0530] Radhika Menon ([EMAIL PROTECTED]) wrote:
> Using Commons-Validator, is it possible to validate a field only if it exists on the 
> form.
> For example, I have a situation in which a "text" field gets generated only if a 
> certain condition is true. What I want to do is, I want to check that if this field 
> exists then, validate that it is numeric against a "mask" which is defined in 
> validation.xml.
> 
> Is this possible?
> 
> Thanks in advance
> Radhika
> 
> 
> 
> ____________________________________________________________
> Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
> http://login.mail.lycos.com/r/referral?aid=27005
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to