[whatwg] Text areas with pattern attributes?
Max Romantschuk
max at romantschuk.fi
Mon Aug 24 06:04:45 PDT 2009
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
--
Max Romantschuk
max at romantschuk.fi
http://max.romantschuk.fi/
More information about the whatwg
mailing list