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

Ian Hickson ian at hixie.ch
Mon Oct 4 13:59:56 PDT 2010


On Fri, 1 Oct 2010, Jonas Sicking wrote:
> 
> However, for <input type=email multiple pattern=".*@company.com"> the
> pattern is applied to the value as a whole, rather than to the
> individual addresses. This seems less useful.

That's an oversight. I'll (eventually) update the spec to say that 
multiple="" makes pattern="" apply to each individual value, not the whole 
list.


> 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.

If you implement it, I will spec it. I didn't add multiple="" to type=text 
in the spec because I was trying to minimise the implementation burden of 
the new attribute.

-- 
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