Open Moggach opened 3 years ago
function validateEmail(email) { const input = /^(([^>()\[\]\\.,;:\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 input.test(email); }
Just noticed that this could be replaced by https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email
Awesome site!
function validateEmail(email) { const input = /^(([^>()\[\]\\.,;:\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 input.test(email); }