The CCK text module does not use the "max_length" value defined for a text field if it is a textarea field. So the built-in validation that checks for #maxlength does not get applied.
I added lines in to do this in the text_widget() function - basically just copying the lines that define #maxlength for text fields - and it seems to work. At least, I am getting validation of the maximum length now, and nothing seems to be broken...
I honestly don't know if this is a "feature" - in that, there is a reason for it being this way - so if there is, that would be useful to know (with some words about what that reason might be, of course...)
I'm attaching a patch file to show the changes I made.
Comment | File | Size | Author |
---|---|---|---|
cck.text_.textarea_maxlength.patch | 1.16 KB | brad.bulger |
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedThe D5 version is no longer being supported. Sorry.