Tnx Richard...let me try and come back to you... :)

-Ram

-----Original Message-----
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 12:32 PM
To: 'Struts Users Mailing List'
Subject: RE: Email Validation Rules


Ramadoss,
Your regexp can't handle an email address that has the domain specified as
an IP address.

Try this one 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,})
)$/

It's from this site:
http://www.breakingpar.com/bkp/home.nsf/Doc?OpenNavigator&U=87256B280015193F
87256C40004CC8C6 

which I found using google with 'email address regular expression'

Regards,

Richard



-----Original Message-----
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 19, 2003 6:34 AM
To: Struts Users Mailing List
Subject: RE: Struts Validation


Hi Luci,
           As you mentioned in your expression there a in-build function
called "email" which will make use of
"org.apache.commons.validator.GenericValidator.isEmail(String arg)" but the
problem here is it does accepts even invalid email address also (eg)
[EMAIL PROTECTED] would rather suggest you to use your own mask pattern
which will make use of the following expression 

        <constant>
                <constant-name>emailAddress</constant-name>
        
<constant-value>^[A-Z0-9a-z_]+(.)[EMAIL PROTECTED](.
)?[A-Za-z]{2,4}$</constant-value>
        </constant>

Hope this help to some extend,

-Ram




-----Original Message-----
From: Luciano Campi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2003 7:55 AM
To: Struts Users Mailing List
Subject: Struts Validation


Hi all,


I need to validate a e-mail CC form field like a 

[EMAIL PROTECTED] , [EMAIL PROTECTED] 


I would you like to known how to create a new Validator class that validate
multiples e-mail address(like a CC and BCC address) and uses
org.apache.commons.validator.EmailValidator to validate a simgle e-mail
address. The Regular Expression will be like this [ [{e-mail}, ]* {e-mail}
]* 


I will very grateful for any advice or pointers.


Regards,
Luciano Campi 




---------------------------------------------------------------------
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]

Reply via email to