How to validate email id in javascript

Find the below code by which you can validate the email field using java-script on client side,

var reg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/;
alert(“Please fill email address in correct format”);
return false;

Share This Post

2 Responses to "How to validate email id in javascript"

Post Comment