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

[whatwg] select element should have a required attribute

From: Eitan Adler <lists@eitanadler.com>
Date: Fri, 18 Jun 2010 13:03:14 -0400
Message-ID: <AANLkTilZm2ORod2NAc02VkyMkXz73KsRzm3Z6oqpvo2T@mail.gmail.com>
On Fri, Jun 18, 2010 at 12:58 PM, Gordon P. Hemsley <gphemsley at gmail.com>wrote:

> I'm not sure how you interpreted, but I wanted to clarify, in case it
> wasn't clear.
>
> I'm pretty sure this person is asking why @required isn't allowed on
> <select> elements.
>
> As in:
> http://dev.w3.org/html5/markup/forms-attributes.html#shared-form.attrs.required
>


>
> I don't know what the exact reasoning is for it not being on there, nor do
> I know exactly how @required is supposed to be enforced, but I do think that
> the method suggested in the bug is a bad one. Sometimes, authors will
> include an empty <option> on purpose in order to allow for an empty option
> to be selected.
>

Perhaps the @requires attribute could be handled somewhat differently. If
present the "default" value becomes the "not allowed" value and the browser
would require you to change the value before submitting the form.

-- 
Eitan Adler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100618/bc8f2da4/attachment.htm>
Received on Friday, 18 June 2010 10:03:14 UTC

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