D
DC
I have this snippet:
<tr>
<td align="left">E-mail</td>
<td>
<asp:TextBox id="txtEmail" runat="server"
MaxLength="100"></asp:TextBox>
<asp:RegularExpressionValidator id="revEmail" runat="server"
ErrorMessage="Enter a valid e-mail address"
ControlToValidate="txtEmail"
ValidationExpression="\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z0-9._%-]{2,4}\b">
</asp:RegularExpressionValidator>
</td>
</tr>
My question is why this regular expression is not invoked if I leave the
textbox blank?
My understanding is blank entry is not met the requirement of that regular
expression.
Am I missing something here?
- DC
<tr>
<td align="left">E-mail</td>
<td>
<asp:TextBox id="txtEmail" runat="server"
MaxLength="100"></asp:TextBox>
<asp:RegularExpressionValidator id="revEmail" runat="server"
ErrorMessage="Enter a valid e-mail address"
ControlToValidate="txtEmail"
ValidationExpression="\b[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z0-9._%-]{2,4}\b">
</asp:RegularExpressionValidator>
</td>
</tr>
My question is why this regular expression is not invoked if I leave the
textbox blank?
My understanding is blank entry is not met the requirement of that regular
expression.
Am I missing something here?
- DC