C# .NET Email Regular Expression Validation
Posted
by Pino
on Stack Overflow
See other posts from Stack Overflow
or by Pino
Published on 2010-04-16T11:29:32Z
Indexed on
2010/04/16
11:33 UTC
Read the original article
Hit count: 381
Can anyone correct the expression below to also not allow blank field?
<asp:RegularExpressionValidator ID="expEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="valid email address required" ValidationExpression="^([a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]){1,70}$"></asp:RegularExpressionValidator>
© Stack Overflow or respective owner