You can use the regularexpressionvalidator to check the length of text, including multiline. Since you are using an existing validator, it should work under AJAX.
The expression is:
^[/s/S]{1,max}$
where max is the maximum length.
Note that /s/S can be replaced with /w/W or any two opposite character groups to reflect every possible character.
--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
www.PeterBlum.com
desertfoxaz
Member
307 Points
358 Posts
New Validator Controls
Jan 09, 2009 03:34 PM|LINK
This would be helpful to have two of the following validator controls:
I've seen various implementations of these controls, I have yet to find a version of a length validator that works well with Ajax.
Thanks
PLBlum
All-Star
30399 Points
5347 Posts
MVP
Re: New Validator Controls
Jan 11, 2009 01:31 PM|LINK
You can use the regularexpressionvalidator to check the length of text, including multiline. Since you are using an existing validator, it should work under AJAX.
The expression is:
^[/s/S]{1,max}$
where max is the maximum length.
Note that /s/S can be replaced with /w/W or any two opposite character groups to reflect every possible character.
FWIW: I have a commercial replacement for the ASP.NET validators called "Peter's Professional Validation" which also addresses your concerns. In addition, you may get something out of my articles on validation: http://www.peterblum.com/dnrtv.aspx and http://aspalliance.com/699.
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
www.PeterBlum.com