W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > December 2011

[Bug 15291] Allow textarea@pattern (input@pattern is specced already so why not)

From: <bugzilla@jessica.w3.org>
Date: Wed, 21 Dec 2011 09:30:49 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1RdIVd-0006wU-QE@jessica.w3.org>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15291

--- Comment #1 from Mathias Bynens <mathias@qiwi.be> 2011-12-21 09:30:49 UTC ---
Use cases for textarea@pattern:

* Enforcing a minimum length. This is probably the most common use case, as
pretty much any forum / bulletin board online already does this server-side
and/or using JavaScript.
* Tools like http://mothereff.in/ampersands, where the textarea’s text content
is validated using a regular expression on-the-fly. Currently this is done
separately in JavaScript (since I want to capture the validation errors) but it
would be useful to have @pattern work for simple regex-based validation, just
so the `invalid` event would fire and the invalid textarea could be targeted
using `:invalid` in CSS. The heavier processing (i.e. matching the actual
errors) could then be done only when needed. This would result in better
performance for the common case where the input is valid.
* Online editors that only allow a specific set of characters, or that disallow
a range of characters.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 21 December 2011 09:30:58 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:02:10 UTC