[whatwg] Web Forms attributes: minlength / autocomplete
html5 at zoid.nl
Thu Jun 7 13:01:15 PDT 2007
Anne van Kesteren schreef:
> On Thu, 07 Jun 2007 21:21:44 +0200, Sander <html5 at zoid.nl> wrote:
>> Before HTML5 there was no HTML validation (as opposed to JS
>> validation) for form controls. So truncating the input value was
>> probably the only way to force the given maxlength (perhaps that's
>> also why there wasn't a minlength attribute before).
>> As HTML5 will get validation attributes like pattern= anyway, maybe
>> it would be consistent to have maxlength act in the same manner. I
>> guess it won't really break things as the end result will be the
>> same, but maybe I'm wrong.
> FWIW: you're wrong. maxlength= was made to truncate (again) because
> not doing so broke existing content. (Implementation experience coming
> from Opera implementing the Web Forms 2 specification.)
So, if I undestand correct, there have been attempts to make it behave
like the new validation attributes.
Thanks for sharing this info.
Can you tell us how it did break? Cause I don't see how it would really
break, as now you just can't add any characters beyond the maxlength and
otherwise you cannot submit if you do add more characters. Either way,
any submitted value will therefore be within the given maxlength.
But hey, if it's not possible... no big deal, as it does have the same
result for the submitted value.
More information about the whatwg