I tried applying the :maxlenght => 40 on a textarea on my form. But it didn\'t work out. Can we have a length limit on a textarea?
:maxlenght
The code for text are
Could it be due to a typo?
":maxlenght => 40 " in your post is misspelt.
EDIT:
I didn't read your post carefully. I think there is no maxlength attribute for textarea in HTML. You will have to handle it in JavaScript. There is more information in "MaxLength on a Textarea".