Javascript Email Validation Form Using Regular Expressions Part 1 of 2




In this tutorial, I show you how to create a html form that uses javascript to check whether or not a entered email address is a valid email or not. Make sure you include a server side validation script as well if your using this on your own website, because if javascript is turned off by bots, then they can bypass the client-side (javascript) validation process

download link for tutorial files:
http://www.freetutorialsrock.com/forum/viewtopic.php?f=9&t=7

Original source


10 responses to “Javascript Email Validation Form Using Regular Expressions Part 1 of 2”

  1. Even if you use a 100% accurate regex filter on the client side, the only way to be totally sure that an email actually exists (and belongs to the user who is trying to sign up) is to send them a verification link. You could do this on your own in a server-side language (takes time, not reliable if you don't know about ensuring mail deliverability), but an easier way is to use a service like https://clicktoverify.net/ to do it for you (free for low volume projects).

  2. REGEX EMAIL VALIDATION SHOULD NOT BE USED AND IT MOST CERTAINLY SHOULD NOT BE ENCOURAGED! Any support for use of regex checks for e-mails I am 100% against. I'm tired of being told my e-mail address of "foo+bar@gmail.com" is invalid. The best option is to ask the user to type their e-mail in twice and if you MUST use a regex checker, then tell the user that their e-mail address does not appear to be valid and ask if they are sure they typed it right. Even go so far as to point out WHAT did not check out in the regexp check, but do NOT stop them from submitting the form

Leave a Reply