Why not use the built in email validator??

In your validation.xml:

depends=email 



> -----Original Message-----
> From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, April 13, 2004 12:55 PM
> To: [EMAIL PROTECTED]
> Subject: Email Validation
> 
> 
> Hi,
>          I'm using custom email validation using mask defined 
> in my validation.xml...when I enter an invalid email as 
> [EMAIL PROTECTED] it fails to validate the . (dot symbol infront 
> of xyz.com) as a invalid one though I metioned expression 
> value must be of [A-Z0-9a-z] after @
> 
> Following is my regular expression 
> 
> <constant>
>       <constant-name>emailAddress</constant-name>
>       
> <constant-value>^[A-Z0-9a-z_]+(.)[EMAIL PROTECTED](.
> )?[A-Z0-9a-z%-]+\.[A-Za-z]+(.)?[A-Za-z]{2,4}$</constant-value>
> </constant>
> 
> Following is the field ccEmail 
> 
> <field property="ccEmail" depends="required,mask">
>       <arg0 key="form.email"/>
>       <msg name="mask" key="errors.email"/>
>       <var>
>               <var-name>mask</var-name>
>               <var-value>${emailAddress}</var-value>
>       </var>
> </field> 
> 
> 
> Can anybody correct me where I'm doing wrong or suggest me 
> any better approach.
> 
> Thank you,
> 
> -Ramadoss
> 
> 
> Note: I tried build-in email validation but still I'm able to 
> enter invalid email address and proceed.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



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

Reply via email to