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

[whatwg] select element should have a required attribute

From: Ashley Sheridan <ash@ashleysheridan.co.uk>
Date: Fri, 18 Jun 2010 12:04:29 +0100
Message-ID: <1276859069.2275.2.camel@localhost>
On Fri, 2010-06-18 at 11:35 +0200, Mounir Lamouri wrote:

> Hi,
> 
> I'm wondering why select element do not have a required attribute. It
> seems to be perfectly suitable. With the required attribute, select
> element would be able to suffer from being missing and the :required
> pseudo-class could apply.
> 
> Is there a reason why the select element has no required attribute or
> it's only an omission?
> 
> Related bug:
> http://www.w3.org/Bugs/Public/show_bug.cgi?id=9625
> 
> Thanks,
> --
> Mounir


Required as in it should always have a value sent? If so, then it always
does. The default value for a select element is not an empty string as
an <option> is always there (unless someone has been stupid enough to
create an empty select list.)

As such, some sort of value will always be sent.

Thanks,
Ash
http://www.ashleysheridan.co.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20100618/1c91f0bd/attachment.htm>
Received on Friday, 18 June 2010 04:04:29 UTC

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