[Javascript] Email validation question

Neal, Craig CNeal at dthr.ab.ca
Thu Jun 7 12:20:43 CDT 2001


I'm having trouble finding the answer I need in my JavaScript books
regarding client-side JavaScript validation.

Typical email validation routines include:

if (document.form.formfield.value.indexOf("@") == -1)

However I need to make sure that a user doesn't enter 2 or more email
addresses in the form field and this only tests to see if there are no @
characters. How do I code it to test for 0 and 2 or more?

Thanks




More information about the Javascript mailing list