I entered email id as Dmwaura@packwood.africa and i got error as "incorrect email address".What changes is needed so that it will accept that email id?
javascript code:
var email = document.getElementById("<%=txtEmail.ClientID%>").value;
var emailPat = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
var matchArray = email.match(emailPat);
if (matchArray == null)
{
alert("Your email address seems incorrect. Please try again");
document.getElementById("<%=txtEmail.ClientID%>").focus();
return false;
}
Source code:
<td align="left">
<asp:TextBox ID="txtEmail" runat="server" Width="196px" Height="19px"></asp:TextBox>
</td>