Originally posted by Bear Bibeault:
On the client or server? Do you know how you would validate a single such entry? What code have you written so far?
The validation is required on the client side using javascript.
I have a form with several input fields. one of the fields is
for accepting multiple email addresses, one email per line. I
need to check that each line contains a valid email address.
The field may be left blank, but if there is any entry then it
should be a valid email address.
I have got a regex
pattern which can validate a single entry.
The regex is as follows:
/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
will it work if I simply group this regex as follows:
(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i)*
Thanks
Pravin
[ October 02, 2007: Message edited by: Pravin Jain ]