Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using textarea elements in forms it's possible to insert an arbitrary amount of text. If not caught in the validation hook this usually leads to PDO exeptions when the data is inserted in the DB.
In consistency with the textfield I request a maxlength attribute for this form element.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2226497-textarea-maxlength.patch | 1.71 KB | Dave Reid |
Comments
Comment #1
Dave ReidHaving a maxlength property is totally valid HTML5: http://www.w3schools.com/tags/att_textarea_maxlength.asp. I agree it should be supported. Even though IE 8 and 9 don't support it, adding FAPI support for #maxlength would mean it still gets validated server-side.
Comment #2
matthias_mo CreditAttribution: matthias_mo commentedmuch appreciated, thank you very much!
Comment #3
youngwolf0 CreditAttribution: youngwolf0 as a volunteer and commentedThis has been sitting for 4 years, is there anything I can do to help get this pushed into core?