validation control

  • Thread starter Thread starter Daves
  • Start date Start date
D

Daves

what control/parameters to use to make a validation control check input
field for string type and minimum length of 5 characters?
 
There is no predefined control to evaluate minimum length. There are two
solutions available though:

1. Use a RegularExpressionValidator with this expression:
^[\s\S]{5, maximum value}$

2. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx) includes a TextLengthValidator that
handles min and max lengths. Its improved over the regex because its faster
(it checks the text length instead of running a regular expression) and its
error message can show the current text length and the current number of
character below the minimum or above the maximum.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top