The Current State of HTML5 Forms

The minlength Attribute

<input type=text minlength=10>
<textarea minlength=20></textarea>

Live Demo




 
Firefox
28
Safari
7
Safari Mobile
7
Chrome
33
Opera
20
IE
11
Android
4.4
Input Not supported Not supported Not supported Not supported Not supported Not supported Not supported
Textarea Not supported Not supported Not supported Not supported Not supported Not supported Not supported
 

The Low Down

The minlength attribute sets the minimum number of characters that an <input> or <textarea> can accept.

  • When supported, it will be applicable to freeform data entry inputs like text, email, url, etc
  • For textareas: Unlike the maxlength attribute which is very well supported (and has been around for a long time), the minlength attribute is not supported in any browser yet.
  • For inputs: The minlength attribute is new, and not yet supported in any browser.
  • Doesn't limit the value: a preset value will pass validation.