/ Published in: JavaScript
Allows for forname.o'[email protected]
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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,}))$/ var rslt = re.test(email); return rslt; }