W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2010

[whatwg] Constraint validation feedback (various threads)

From: Mounir Lamouri <mounir.lamouri@gmail.com>
Date: Tue, 16 Nov 2010 16:38:11 +0100
Message-ID: <4CE2A563.3060604@gmail.com>
On 11/16/2010 04:35 PM, Anne van Kesteren wrote:
> On Tue, 16 Nov 2010 16:04:08 +0100, Mounir Lamouri
> <mounir.lamouri at gmail.com> wrote:
>> There is a LinkedIn form broken because of that: there are two fields
>> with a non-HTML5 placeholder (ie. it's the value) which is set with
>> .value="something" but the field has a maxlength set to 4 (it's a year).
>> With a checkbox checked, one of this field will be hidden, with a value
>> greater than the maxlength making the form always invalid.
> Actually, that specific problem was addressed long ago based on feedback
> from us:
> "Constraint validation: If an element has a maximum allowed value
> length, and its dirty value flag is true, and the code-point length of
> the element's value is greater than the element's maximum allowed value
> length, then the element is suffering from being too long."
> The "dirty value flag" is only true when the user has edited the control.

Actually, not:
    On getting, it must return the current value of the element. On
setting, it must set the element's value to the new value, set the
element's dirty value flag to true, and then invoke the value
sanitization algorithm, if the element's type attribute's current state
defines one.


Received on Tuesday, 16 November 2010 07:38:11 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:28 UTC