Categories:

Home / Free JavaScripts / Email and Email Validation / Here

Cut & Paste Advanced Email Check

Credit: JavaScript Kit

Description: A script that closely examines the content of a form box to ensure that the user entered a valid email address. If not, the form submition is canceled, and the surfer prompted to re-enter a valid address. The script makes the following assumptions regarding what a valid email address is:

-Contains a least one character procedding the "@"
-Contains a "@" following the procedding character(s)
-Contains at least one character following the "@", followed by a dot (.), followed by either a two character or three character string (a two character country code or the standard three character US code, such as com, edu etc)

Note that this script requires NS 4+ or IE 4+ to function- all other browsers will simply not participate in the form validation process.

Example:

Please input a valid email address:

Directions: Simply cut and paste the below code into the <body> section of your page. It
contains a form with one box that is checked for "email validity". You can add in more form elements into the form, as you would with any other form.


JavaScript Tools:
Site Info

CopyRight 1998-2012 JavaScript Kit. NO PART may be reproduced without author's permission.