How to Validate Email Address in JavaScript ?

Published on June 7, 2015 by abundantcode

Filed under JavaScript

Last modified June 7, 2015

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 2078 times

Here’s a sample JavaScript function that shows how to validate an email address .

How to Validate Email Address in JavaScript ?

function ValidateEmail(email) 
    var result = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
    return result.test(email);
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


You might be Interested in these Posts

How to use array Rank in C# ?

In C# , the Rank property of the array is is used to get the rank of the array. In simple terms , ra...

ES6: The future is now at Warrington on October 18 , 2016

JavaScript North West User Group is hosting its user group meet on the topic "ES6: The future i...

How to append an array to another in JavaScript ?

In JavaScript , you may want to append one array to another array(s) to combine their elements resul...