[whatwg] Text areas with pattern attributes?

Scott González scott.gonzalez at gmail.com
Wed Sep 30 05:58:31 PDT 2009


On Tue, Sep 29, 2009 at 11:43 PM, Ian Hickson <ian at hixie.ch> wrote:
>
> > So add 'multiple' on all of those and you'll have a good reason you'd
> > want them all to be able to wrap over multiple lines. I.e. ability to
> > enter multiple bank numbers, multiple social security numbers or
> > multiple usernames.
>
> I could see an argument for <input type=text pattern=... multiple>. That's
> probably best left for a future version though.
>
> But I don't think that's the same as multiline input.
>

If you could specify that a pattern could match multiple times you would
also need to specify the delimiter. Support for multiple should also be very
easy by just modifying your pattern without support for a multiple
attribute.

> All of these seem like a bad idea to keep separate for multiline inputs
> > vs. single line inputs. Except for the default value which for historic
> > reasons make sense to use separate mechanisms, and cols/size which are
> > both mostly rendering differences.
>
> It's not clear how list="" would work with <textarea>, and I'm not aware
> of any UA that does <textarea> autocomplete.
>

The closest example of this that I can think of is Facebook's autocomplete
for messages, but even adding autocomplete to a textarea wouldn't make it
possible to implement what they have.

I could see pattern being supported for textarea, but in the same way as a
text input. I think it's okay to require JavaScript and use the custom
validation system for more complex validation, especially for this version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090930/3aff1817/attachment-0001.htm>


More information about the whatwg mailing list