email validation regex #Email

 EMAIL VALIDATION REGEX

 

export const emailValidation = email => {
    const regex = /^(([^<>()[\]\\.,;:\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 regex.test(email.toLowerCase());
}

 Click here for share

Comments

Popular posts from this blog

Image Preview Before upload image into ReactJs

Format mobile number to this format "(845) 963-2545" #mobileFormat