Answers for "how to check if email is valid node js"

5

how to validate an email address in javascript

function validateEmail(email) 
    {
        var re = /S+@S+.S+/;
        return re.test(email);
    }
    
console.log(validateEmail('[email protected]'));
Posted by: Guest on June-18-2020
0

How to validate an email address in JavaScript

function validateEmail(email) {
    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,}))$/;
    return re.test(String(email).toLowerCase());
}
Posted by: Guest on October-20-2020

Code answers related to "how to check if email is valid node js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language