W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2009

[whatwg] Text areas with pattern attributes?

From: Max Romantschuk <max@romantschuk.fi>
Date: Mon, 24 Aug 2009 16:04:45 +0300
Message-ID: <4A928FED.5000100@romantschuk.fi>
Mike Shaver wrote:
> It's also pretty common to enter multiple email addresses or tracking
> numbers or URLs one-per-line for batch operations on sites, and they
> would benefit from having client-side validation of such patterns.

I also believe that it would be beneficial to have an option to 
regex-validate a text area in cases like this.

One might argue that a case like this is served by having an AJAX 
interface with multiple inputs, but in my experience a lot of real world 
office work involves "the worlds most used database", the spreadsheet.

It's not far fetched to imagine copy-pasting a bunch of data from a 
spreadsheet column into a textarea, in which case it would make sense to 
be able to have client side validation for a given pattern repeated n 
times with newlines in between.

I really don't see a case for not allowing pattern for a textarea. The 
implementation side should not be that different from the same attribute 
on a text input? Except for the client side overhead of parsing a large 
amount of data against a regex, what would be the drawbacks on having 
pattern on textareas?


        Max Romantschuk
        max at romantschuk.fi
Received on Monday, 24 August 2009 06:04:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:15 UTC