Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the expression on RegularExpressionValidator to check if the Textbox text is 6 or more characters long?

what is the format for the RegularExpressionValidator control to check if the textbox to be validated has 6 or more characters?

like image 312
jerbersoft Avatar asked May 14 '09 11:05

jerbersoft


2 Answers

^.{6,}$ will do it in most variants of regex. Let me verify it works in this specific case.

EDIT: I guess it worked.

like image 102
Welbog Avatar answered Nov 09 '22 07:11

Welbog


<asp:RegularExpressionValidator ID="MyTextBoxValidator" runat="server" 
   ControlToValidate="MyTextBox"
   ErrorMessage="Minimum length is 6"
   ValidationExpression=".{6}.*" />
like image 4
splattne Avatar answered Nov 09 '22 08:11

splattne