This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10053 - how about minlength? i'd like to see certain fields to have a minimum amoung of characters for validation
Summary: how about minlength? i'd like to see certain fields to have a minimum amoung ...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 enhancement
Target Milestone: 2013 Q4
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: https://www.w3.org/Bugs/Public/show_b...
Whiteboard:
Keywords:
: 10308 11870 16936 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-30 02:41 UTC by contributor
Modified: 2014-04-20 05:01 UTC (History)
9 users (show)

See Also:


Attachments

Description contributor 2010-06-30 02:41:03 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#the-maxlength-attribute

Comment:
how about minlength? i'd like to see certain fields to have a minimum amoung
of characters for validation

Posted from: 209.99.13.239
Comment 1 Ian 'Hixie' Hickson 2010-08-28 04:48:30 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: Maybe one day. Let's let the browsers catch up first.
Comment 2 Ian 'Hixie' Hickson 2010-09-10 09:39:49 UTC
*** Bug 10308 has been marked as a duplicate of this bug. ***
Comment 3 Mounir Lamouri 2011-01-26 20:56:51 UTC
*** Bug 11870 has been marked as a duplicate of this bug. ***
Comment 4 Aryeh Gregor 2011-01-27 01:02:51 UTC
Note that minlength="n" is equivalent to pattern=".{n}".  Not clear if it's common enough to really need special handling.
Comment 5 Mounir Lamouri 2011-01-27 15:25:48 UTC
(In reply to comment #4)
> Note that minlength="n" is equivalent to pattern=".{n}".  Not clear if it's
> common enough to really need special handling.

No, minlength="n" isn't equivalent too pattern=".{n}". @pattern should only be used for specific cases given that it removes all semantic.

In addition of passwords fields that require a minimum length (I guess that would be the primary use case), minlength could be used for field that require a specific length in association with maxlength (with maxlength and minlength having the same value).
Comment 6 Ian 'Hixie' Hickson 2012-10-19 23:05:35 UTC
*** Bug 16936 has been marked as a duplicate of this bug. ***
Comment 7 public-rdfa-wg 2013-01-24 06:51:55 UTC
This bug was cloned to create HTML WG bug 19047.
Comment 8 Ian 'Hixie' Hickson 2013-05-29 23:53:14 UTC
Bug 15291 suggests there's a lot of demand for this, relatively speaking.
Comment 9 contributor 2013-10-03 18:22:12 UTC
Checked in as WHATWG revision r8206.
Check-in comment: Add minlength='', since data shows people are using pattern='' to work around the absence of this feature.
http://html5.org/tools/web-apps-tracker?from=8205&to=8206