Hi
This is simple steps to set minimum and maxumum length of passwerd.
Step 1) For Req. filed
[asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="txtpassword" Display="None"
ErrorMessage="Your password is a required field."][/asp:RequiredFieldValidator]
Step 2) For set Min n Max length of password.
[asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server"
ControlToValidate="txtpassword" Display="None"
ErrorMessage="password shuld be 6-32 characters" ValidationExpression="\w{6,}"][/asp:RegularExpressionValidator]
Thanks
Helpondesk Team
No comments:
Post a Comment