var EmailId = $("#EmailID").val();
if (Name == "" || Name == "Required" || EmailId == "" || EmailId == "Required") {
$("#Name").css("border", "1px solid Red");
$("#EmailID").css("border", "1px solid Red");
return false;
}
var emailPat = /^(([^<>()[\]\\.,;:\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,}))$/;
var matchArray = EmailId.match(emailPat);
if (matchArray == null) {
$("#EmailID").css("border", "1px solid Green");
$("#EmailID").val('Invalid Email Address');
$("#EmailID").focus();
return false;
}
No comments:
Post a Comment