commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <s...@gtsdesign.com>
Subject Re: Validate only if the field exists using Commons Validator
Date Wed, 10 Sep 2003 23:37:37 GMT
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 (radsforyou@lycos.com) 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: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message