[whatwg] Interaction between @multiple, @pattern and @list

On 10/01/2010 05:11 PM, Jonas Sicking wrote:
> I suggest that when pattern and multiple are both applied on a
> control, that the pattern is applied to each individual component of
> the value, rather than the value as a whole.

That makes sense. However,this is removing some possibilities with the
pattern attribute. For example, the author wouldn't be able to ask for
different emails with at least one from company A and company B. In
addition, asking for "at least x emails", "exactly y emails" or "maximum
z emails" wouldn't be possible.
Though, the former case doesn't sound to be important and the later
would be better with new attributes like minentries and maxentries.

> I also realized that @list currently is pretty useless in similar
> situations together with <input type=text>. Often times text inputs
> are used to enter a list of tokens. One example is the keyword input
> field in bugzilla. It helps you autocomplete from the list of
> available keywords, but also lets you enter multiple keywords in the
> same text field. As things stand now you can't use @list to accomplish
> this as it operates on the whole value rather than each comma
> separated token.
> 
> It would be possible to make this work by allowing @multiple to apply
> to <input type=text>. The only effect would be that @list and @pattern
> would operate on each comma separated token.

A more common use case would be tag/keywords list on blogs/websites.
Currently CMS must provide their own UI for that. list+multiple might be
really helpful.

Thanks,
--
Mounir

Received on Friday, 1 October 2010 22:07:31 UTC