Guest it_ashu85 Posted June 6, 2006 Share Posted June 6, 2006 hi all!!!i m working on a project in ASP.NET.i wanted to know tht how can I validate the length of the password field.Its a textbox.User should enter minimum 5 characters.Which validator control should be used n how?plz help me out... Link to comment Share on other sites More sharing options...
pulpfiction Posted June 6, 2006 Share Posted June 6, 2006 Try this.. in general regex format is "\w{min,max}" <form ID="Form1" name="Form1" runat=server><asp:ValidationSummary ShowSummary=True DisplayMode=SingleParagraph Enabled=True ID="vs" Runat=server /><asp:TextBox ID="txt" Runat=server Width="100"></asp:TextBox><asp:RegularExpressionValidator Runat=server Display=Dynamic ValidationExpression="\w{8,20}" ErrorMessage="invalid input" ControlToValidate="txt">*</asp:RegularExpressionValidator><br /><asp:button text="Submit" runat="server" ID="Button1"/></form> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now