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]

Reply via email to