我需要修改我的正则表达式验证器代码以要求用户满足以下密码要求:
一种。至少包含 2 个大写字符:A, B, C
等。
湾。至少包含 2 个小写字符:a, b, c,
等。
C。至少包含 2 个数字:1,2,3,4,5,6,7,8,9,0
d。至少包含2个特殊字符,即
! @ # $ % ^ & * ( ) _ + | ~ - = \ ` { } [ ] : " ; ' < > ? , . /
当前代码只需要 10 个字符的密码长度:
<asp:RegularExpressionValidator ID="valPassword"
runat="server" ControlToValidate="txtPassword"
ErrorMessage="Error: 10 character required password length"
ValidationExpression=".{10}.*" />