Attributes · minlength
Which HTML minlength attribute attributes matter?
These attributes decide how the minlength behaves and what actually gets emailed to your inbox when someone submits.
| Attribute | What it does | Docs |
|---|---|---|
minlength | The fewest characters a non-empty value may have, like minlength="8". A shorter edited value blocks the submit. | MDN |
maxlength | The most characters the field accepts. Typing stops at the limit. | MDN |
required | Makes the field mandatory. Pair it with minlength so an empty field can't slip through. | MDN |
pattern | A regular expression the whole value must match, for rules about which characters are allowed. | MDN |




