9951 explained code solutions for 126 technologies


javascriptValidate email


var email = '[email protected]';
const 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 is_email_valid = re.test(String(email).toLowerCase());ctrl + c
var email

declare test email

const re

regular expression to check email validity (source)

is_email_valid

this variable will contain true if email is valid