I do not want to allow blank passwords, but if I leave the textbox blank, the text property from the regular expression does not show up until I enter at least 1 character. How do I allow it not to have a blank password? I tried using the + sign instead of the * sign, but it still did not work.
<asp:RegularExpressionValidator
ControlToValidate="txtPassword"
Display="Dynamic"
runat="server"
Text="Invalid"
ValidationExpression="^(?=.*\d{1})(?=.*[a-zA-Z]{2}).{7,}$"
ValidationGroup="UserRegistrationValidation">
</asp:RegularExpressionValidator>