How to add Regular Expression validation for send mail dialog box..i have already set required field validator now i want to validate it using regular expression. It's not working properly at all..need your help..thanks in advance.
$("#submit").click(function (e) {
var email = $("#UserEmail").val();
var emailReg = /^([a-zA-Z0-9_\.\-])+@\[a-zA-Z0-9\-]+\.([a-zA-Z0-9]{3})+$/;
if (!emailReg.test(email)) {
alert("Please Enter Valid Email Id");
e.preventDefault();
} else {
alert("success");
}
});
But in the above code i am getting error at @ symbol..