[whatwg] Constraint validation feedback (various threads)

Jonas Sicking jonas at sicking.cc
Fri Mar 25 14:53:43 PDT 2011

On Wed, Mar 23, 2011 at 8:18 PM, TAMURA, Kent <tkent at chromium.org> wrote:
>> Ok. It seems the best solution is to just remove the "suffering from being
>> too long" state and simply require that authors not let authors enter
>> values longer than the maxlength. Right?
> I agree removing tooLong validity.
> Google Chrome 10 has the interactive validation, and is causing some
> compatibility issues about maxlength.
> http://www.google.com/support/forum/p/Chrome/thread?tid=4f612fe2abafc365&hl=en

I don't think we should remove the tooLong validity check. We've been
discussing fixing the horrible UI that browsers currently use when
maxlength is in effect.

The problem is that for something like <input name=tweet
maxlength=140> browsers currently prevent you from ever entering more
than 140 characters. This is terrible UI since it means that if you
are half way through a sentence when you reach 140 characters, you
have to abort your current train of thought, go edit the existing text
to make it shorter, go back to the end to keep writing until you reach
140 characters again, rinse, repeat.

This is why sites like twitter end up not using maxlength and instead
use javascript to implement what they need.

To address this problem we're planning on making Firefox allow the
user to type more than maxlength number of characters, but make the
field invalid when that happens. Making it invalid will change the UI
as well as prevent submission.

/ Jonas

More information about the whatwg mailing list