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})$/;
if(!reg.test(document.getElementById(“email”).value)){
alert(“Please fill email address in correct format”);
document.getElementById(’email’).focus();
return false;
}
RT @sumitbansal054: How to validate email id in javascript: Find the below code by which you can validate the email field usin… http://t.…
Short and simple code. Thanks.