You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Darren Hartford <dh...@ghsinc.com> on 2004/01/09 16:04:03 UTC

[validator] validate if field not null/ValidWhen

Hey all,
I noticed in Struts they have a 'validwhen' rule to help where you only want to process validation based on the rule (i.e. only check if it is 'integer' if the field is not null).

Does the straight validator have same/similar functionality for use outside of struts? I can't seem to figure it out or find any examples.

TIA!!
-D

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


Re: [validator] validate if field not null/ValidWhen

Posted by David Graham <gr...@yahoo.com>.
--- Darren Hartford <dh...@ghsinc.com> wrote:
> Hey all,
> I noticed in Struts they have a 'validwhen' rule to help where you only
> want to process validation based on the rule (i.e. only check if it is
> 'integer' if the field is not null).
> 
> Does the straight validator have same/similar functionality for use
> outside of struts? I can't seem to figure it out or find any examples.

Commons Validator provides 2 major pieces of functionality:
1.  Basic helper methods that validate credit cards, numbers, etc.
2.  A framework for plugging in validation actions to be run against
forms.

It does not provide any validation actions out of the box because they are
custom for each environment.  Struts provides many of these actions like
validwhen that are tailored for the Struts web environment.

David

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


__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

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