[whatwg] [WF2] |min| and |max| number of selected |option|s
Ian Hickson
ian at hixie.ch
Wed Nov 5 07:20:25 PST 2008
On Sat, 31 May 2008, Christoph Päper wrote:
>
> When using
>
> <input type=checkbox>
>
> or
>
> <select multiple>
>
> one somtimes wants to limit the number of selected check boxes or
> options. I have no idea how to model this with |input|, but |select|
> could adopt the |min| and |max| attributes. They would not limit the
> content of |value| but the number of selected |option|s, which is
> similar to what is already specified for file upload controls. A common
> and special case would be setting the same value on both attributes to
> require a certain number of options to be selected.
>
> I'd really like it if someone could come up with a way to make this work
> with |input|, too.
Since this is a pretty specialised desire, and not one that we really want
to encourage (it's somewhat sub-optimal UI), I think this is something we
should leave up to scripts to enforce, using oninput="",
setCustomValidity(), and so forth.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list