Please create a Jira issue for the Email validator. All of the field
validators should check for a null field value and just return. The
range validators do this. In cases where you want to require a validtor,
you should also apply the required validator. 

> -----Original Message-----
> From: Sakke Wiik [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 16, 2004 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: [OS-webwork] Validating an optional field
> 
> 
> Is it possible to validate optional fields using the 
> ValidationInterceptor? I need to check values only if they 
> are set, just 
> like "required" works in Struts validation. For example the 
> email-validator doesn't accept an empty field.
> I was thinking of something like this:
>     <field name="email">
>         <field-validator type="email">
>             <param name="required">false</param>
>             <message>Invalid e-mail</message>
>         </field-validator>
>     </field>
> 
> I understand it's possible to write fieldexpression for all 
> fields, but 
> aren't there any other way?
> 
> Thanks,
> Sakke
> 
> 
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now! 
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438> &op=click
> 
> _______________________________________________
> 
> Opensymphony-webwork mailing list 
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
> 


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to