I want to make sure that the email address entered by the user contains @
and .
using RegExp.
This is my code:
var patt = new RegExp("@");
var pattresult = patt.test(document.getElementById("email").value);
if (pattresult != true){
errMsg += "Enter a valid Email Address.";
result = false;
}
Working fine so far only for @
. How can I add .
in the same pattern?