/Email-Verifier

Validates emails, including cross-checking TLD with ICANN

Email-Verifier

Validates email addresses by checking for formatting errors and cross-checking the TLD with ICANN

To use, simply add this in your header:

<script src="emailverifier.js"></script>

To validate an email using JavaScript, use:

if (validateEmail(yourtextbox.value)) //Valid Email

A simple demo that alerts the user whether the email is Valid or Invalid:

alert(validateEmail(yourtextbox.value)?"Valid":"Invalid");
Some example valid email addresses:
foo.bar@gmail.comStandard email
booo000oood@yahoo.jpJapan TLD
boss@nick.digitalDIGITAL TLD
w@yxz.usUS TLD
Some example invalid email addresses:
extra-dot@typo..comTouching ..
wrong@tld.yippyInvalid TLD
starwars-at-at@@rocks.coTouching @@
fail.@fail.failTouching .@