- Issue created by @2dareis2do
- Status changed to Postponed: needs info
7 months ago 1:09pm 2 August 2024 Does pattern work on
textarea
elements? https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern says "The pattern attribute is an attribute of the text, tel, email, url, password, and search input types".- π¬π§United Kingdom 2dareis2do
Thanks @cilefen
Yes i think you are correct.
Actually even the w3c also links points this out
Note: The pattern attribute works with the following input types: text, date, search, url, tel, email, and password.
I guess that would explain why text area was omitted from the drupal fapi implmentatiion.
That said, apparently, it is also possible to implement pattern on text area using custom code:
https://stackoverflow.com/questions/13643417/how-to-validate-pattern-mat...
This could be useful in some situations where text input is longer than can be fitted into a text input.