[whatwg] Text areas with pattern attributes?

Ian Hickson ian at hixie.ch
Sun Aug 30 20:04:13 PDT 2009


On Sun, 30 Aug 2009, Jonas Sicking wrote:
> 
> Ok, addresses might not be the best example. I would imagine that most 
> use cases for pattern for a single line, carries over if you want to 
> have that single line wrap and be displayed as multiple lines. So if you 
> can provide the list of use cases that was used to add pattern on 
> single-line input and I'd be very surprised if not most of them carries 
> over to multi-line.

The main use cases that were considered as far as I recall were credit 
card numbers and other bank numbers (we originally considered type=cc but 
that turned out to be more locale-specific than expected), social security 
numbers and other formatted serial numbers, and username fields that 
exclude certain characters.


> The difference between <input type=text> and <textarea> is mostly a 
> rendering one. One scrolls the text when it can't fit, the other wraps. 
> Do you really think that creates enough of a difference that the feature 
> set should be different?

The feature sets are different in many other ways. This is hardly an 
exception. For example, <textarea> has no list="" support, cols="" works 
differently than size="", the default value is set differently, <textarea> 
doesn't support autocomplete, etc.

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