Textarea not required

Hi, I’m just trying to use a textarea in a model’s form, which is not required and not searchable. So it’s not mentionnend in any of the model’s rules and its value is never saved or updated. How to make this work? I tried with ‘allowEmpty’ in many ways, but never found how/where to write it. Or maybe I have to use a ‘length’ validator. Thanks for your help, it seems so simple… :(

Read this subsection of The Definitive Guide to Yii. Hint: safe validator.

Edit: mdomba added a better link.


Thanks for the quicks answers :)

mdomba’s post disappeard, but I could find the link the mail I received:

And the answer is…

array('content', 'safe'),

… Thanks again!

I posted at the same time as tri… but a milliseconds later… so I just deleted the post at it looked to me that they where identical ;)

Yeah that’s what I thought ;)

But I mentionned your link as tri said it was better (I know, that’s what you thought ;))