If you're using this from Struts, the FieldChecks methods only run the
validation if the value is supplied so using just email will work for
optional fields (use required and email for non-optional fields).  

If you're using this in a non-Struts app you need to front EmailValidator
with your own method that only runs the validation when the value is not
null similar to FieldChecks.  We're currently working on adding fully
functional validators so you won't have to do this in the future.

David

--- Mike Tedesco <[EMAIL PROTECTED]> wrote:
> Can someone tell me how I set up a form validation in my xml that can be
> optional (i.e. passed as null). But if it is supplied then I can perform
> the validation
>  
> <field
> 
> property="email2"
> 
> depends="email">
> 
> <arg0 key="ilt.Email2"/>
> 
> </field>
> 
>  
> 
> Like above I want only the email validation to be performed if the field
> is not null.
> 
>  
> 
> -- Thanks
> 
> 



        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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

Reply via email to