[whatwg] minlength attribute
ian at hixie.ch
Wed Oct 22 04:25:41 PDT 2008
On Mon, 27 Feb 2006, laos wrote:
> minlength attribute.
> This attribute applies to
> password <http://whatwg.org/specs/web-forms/current-work/#password>,
> and email <http://whatwg.org/specs/web-forms/current-work/#email> input
> types, and textarea elements.
> For text input controls it specifies the minimum length of the input, in
> terms of numbers of code points
On Tue, 28 Feb 2006, Matthew Raymond wrote:
> Well, this wouldn't be useful at the actual time of input, because
> you may delete enough of the contents to go below the minimum length
> prior to putting in new input. Clearly this would have to apply for
> validation, and I believe that the |pattern| attribute would already
> cover this, as you can specify the number of character required in
> |pattern|. Or am I misunderstanding how |pattern| works?
On Wed, 1 Mar 2006, laos wrote:
> I think that this would be useful for forms in which a username or
> password is asked, and is required that they contain at least six or
> eight characters and I also consider that would be useful so that the
> user agents show error messages. The pattern attribute could solve this
> (with exception of the error message), but also this attribute would
> solve many cases that the specification solves of other way (I think
> that most of the things they could be solved with this attribute).
Thanks for your feedback. I agree that this could be a useful feature in
certain cases. It's not clear to me though that these cases are that
common. Could you elaborate on the use cases for this? Is it just
usernames and passwords, effectively?
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg