【发布时间】:2010-07-14 05:28:23
【问题描述】:
我有以下 asp.net 标记:
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"
ValidationGroup="passwordValidation"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
ControlToValidate="txtPassword" Text="Required" ValidationGroup="passwordValidation" />
<asp:RegularExpressionValidator runat="server" ControlToValidate="txtPassword"
Text="Passwords should contain a minimum of 7 characters with at least one numeric
character." ValidationExpression="^(?=.*\d{1})(?=.*[a-zA-Z]{2}).{7,}$"
ValidationGroup="passwordValidation" Display="Dynamic"></asp:RegularExpressionValidator>
如果我输入像 test1234 这样的密码,它会在 chrome 和 firefox 中通过,但 Internet Explorer 中会显示我的密码应包含至少 7 个字符和至少一个数字字符的消息
【问题讨论】:
-
我在IE8上用VS2010测试了上面的代码,无法重现问题。你能提供更多细节吗?
-
...特别是,您在哪个版本的 IE 上测试它?