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

[whatwg] <output> should not be barred from constraint validation

From: Mounir Lamouri <mounir.lamouri@gmail.com>
Date: Tue, 20 Jul 2010 19:32:58 +0200
Message-ID: <4C45DDCA.7020301@gmail.com>
On 07/20/2010 06:00 PM, Tab Atkins Jr. wrote:
> On Tue, Jul 20, 2010 at 6:37 AM, Mounir Lamouri
> <mounir.lamouri at gmail.com> wrote:
>> Hi,
>>
>> At the moment, three form elements are barred from constraint
>> validation: object, fieldset and output. I can understand why object and
>> fieldset are barred from constraint validation but I think output could
>> use the constraint validation.
>>
>> Indeed, it could be nice to be able to use setCustomValidity() on
>> <output>. IMHO, it is part of the use case of <output>: this element
>> should represent the result of a calculation and we may want to do a
>> validation check on this result.
>> For example, we could imagine a web application to choose courses in an
>> university and you have to select between 12 and 18 credits. <output> is
>> the best way to represent the total credits used and it would be easy to
>> make it invalid when the sum is not correct.
> 
> I think that's actually pretty interesting.  I might be able to get behind this.
> 
> ~TJ

I realize that requires to change 4.10.20.2, more specifically
"statically validate the constraints" to not only consider submittable
elements but all listed elements.

--
Mounir
Received on Tuesday, 20 July 2010 10:32:58 UTC

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