'Is there any built in function in javascript/jquery to filter email like php's function (!filter_var($variablePassed, FILTER_VALIDATE_EMAIL))
// check if e-mail address is well-formed
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
}
This code is filtering the email provided by the user.
My question is is there any built in function in javascript/jquery like this php built in function. Regex is doing it but some times regex stop working.I do not know why. My question is not so good but my mind force me to ask so i can feel good.I cannot sleep without answer.
Solution 1:[1]
There is no built-in but 3rd-party library provided on NPM.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | mpyw |