[whatwg] Text areas with pattern attributes?
Kornel
kornel at geekhood.net
Tue Aug 25 08:53:54 PDT 2009
> On Tue, Aug 25, 2009 at 3:05 AM, Anne van Kesteren<annevk at opera.com>
> wrote:
>> Also, maxlength cannot be enforced as client-side validation
>> requirement due to compatibility issues.
>
> Hmm, I hadn't thought of that. You're right, that would provide
> somewhat inconsistent behavior. On the other hand, just not letting
> you type any more is if anything probably better than an error
> message. I don't see why you'd ever *want* the behavior of
> pattern=".{0,n}" for maxlength=n.
With maxlength (as implemented in current browsers) it's not possible
to paste string that is too long and then trim it to desired length,
e.g. if I have "Your order reference is AB-456" in my clipboard, I
can't use it in input field that has maxlength=6.
So I wish maxlength behaved more like pattern in all cases :)
--
regards, Kornel
More information about the whatwg
mailing list