commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Shea <>
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.


[2003-09-10 23:21 +0530] Radhika Menon ( wrote:
> Using Commons-Validator, is it possible to validate a field only if it exists on the
> 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!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message