length validator in asp.net
<tr>
<td align="right">
<asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
</td>
<td colspan="2">
<asp:TextBox Width="250px" ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="PasswordRequired" ForeColor="Red" runat="server"
ControlToValidate="Password" ErrorMessage="Required" ValidationGroup="Login2"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
ControlToValidate="Password" ForeColor="Red" ErrorMessage="Minimum length is 8" ValidationGroup="Login2" ValidationExpression=".{8}.*" />
</td>
</tr>