Answers for "Email validation javascript regex MDN"

15

email regex javscript

function validateEmail(email) {
    var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(String(email).toLowerCase());
}
Posted by: Guest on November-17-2019
0

email validation in javascript using regular expression

var emailReg =  /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
if(!emailReg.test($('#inputUsername').val()) ){
  alert('Enter valid email');
  return false;			
}
Posted by: Guest on March-10-2021

Code answers related to "Email validation javascript regex MDN"

Code answers related to "Javascript"

Browse Popular Code Answers by Language