Strewth! Remind me never to open a message on regexp at 3am again. Thought I was reading a lisp forum by mistake. ;-)
Reckon that one must have taken a while to come up with! -----Original Message----- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Wednesday, 14 April 2004 02:50 To: Struts Users Mailing List Subject: RE: Email Validation Try this instead, /^(([^<>()[\]\\.,;:[EMAIL PROTECTED]"]+(\.[^<>()[\]\\.,;:[EMAIL PROTECTED]"]+)*)|(\".+\"))@((\[[0-9]{1 ,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}) )$/ -Richard --- Ramadoss Chinnakuzhandai <[EMAIL PROTECTED]> wrote: > look like it accepts some invalid email address eg. > [EMAIL PROTECTED],[EMAIL PROTECTED] > > -----Original Message----- > From: Joe Hertz [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 13, 2004 2:12 PM > To: 'Struts Users Mailing List' > Subject: RE: Email Validation > > > Whoops. Should have read the very bottom. > > What's wrong with the built in email validator? (I'm > using it, so I > definitely want to know :-) > > You might want to look at the mask it uses for some > insight. > > > -----Original Message----- > > From: Joe Hertz [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, April 13, 2004 2:04 PM > > To: 'Struts Users Mailing List' > > Subject: RE: Email Validation > > > > > > 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] > > > > > > > > > > --------------------------------------------------------------------- > 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] > __________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html --------------------------------------------------------------------- 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]