This
article will show you how can use html5 validation for password minimum length
in asp.net. In this we will define min length of the password which user have
to enter.
So for this first we will create a new asp.net application and add the below code into the page.
So for this first we will create a new asp.net application and add the below code into the page.
<div>
Password:
<asp:TextBox ID="txtPassword"
runat="server" TextMode="Password" required minlength="6"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Submit" />
</div>
|
In above code please check the bold and highlighted part of the code. In this I have added required and minlength. In this required will force user to enter some value and minlength force user to insert min 6 character. Without this user will not be able to submit the form.
0 comments:
Please let me know your view