Text field validation

  • Thread starter Thread starter Big E
  • Start date Start date
B

Big E

I'm using SQL Server and ASP.Net. I would like the users when typing in
their passswords to enter in:
1. At least 6 characters
2. At least 1 number
3. At least 1 letter.

I have looked at the validator controls and can't find a example.
Any ideas or articles?

Thanks.

Erik
 
Use the regular expression validator and enter the correct validation
expression. There is a help file accessible from the ValidationExpression
property dialog box that is a tutorial on regular expressions.
 
I can't find anything that will show me how to force users to enter at least
1 letter and 1 number.

Thanks.

Erik
 
To make the textbox required AND to have the data follow a specific pattern,
you need to add 2 validators to form (1 is a RequiredFieldValidator and 1 is
a RegularExpressionValidator) and have BOTH of them point to the textbox as
the ControlToValidate.

Now, users will be required to fill in data AND the data they fill in will
have to follow the regular expression you set up.
 
Back
Top