# Wednesday, May 02, 2007
« Rhino Mocks Documentation | Main | No thanks, I just had a sneal »
HTML textarea controls do not support the maxlength attribute like the text input control.  Doh!  The nice easy way around this is to add an ASP.NET regular expression validator with the following regex: ^[\s\S]{0,25}$

The only slight problem with this approach is that it is possible to input more than X number of characters, but the validator will display an error and disallow the page to be submitted.

Comments are closed.