The minlength Attribute

The Current State of HTML5 Forms

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

Live Demo







Firefox
28

Safari
7

Safari
7

Chrome
33

Opera
20

IE
11

Android
4.4
Input
Textarea

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.

Our Cookie Policy and Privacy Policy outline how we use cookies to help optimize service, personalize content, tailor and measure our marketing, and improve your user experience. I agree to use of cookies for these purposes.