actionUpdate not updating non-required fields?

I’m basically using the default out of the box Yii code, but am running into something a bit odd. If you have the following code in actionUpdate() in the controller:











and this in the rules() fn in the model:

	return array(

		array('active, url, cover, title, body', 'required'),




then it works fine.

But if I take "body" out of the required fields, it stops updating body when you save! Weird huh? What am I missing?


You should read this section of The Definitive Guide to Yii.


Awesome. That explains it perfectly. I found that adding any validator fixed it:

array('body', 'length', 'allowEmpty'=>true),

for example.

Now I know why.