rules required on create

I have this rule on the model:


it seems that the on create action doesnt work…

the ‘on’ is the scenario, so you’d instantiate the model like:

$model=new Model('create');

if you want to apply the create scenario.

Yii’s default create scenario is insert and the update scenario is, well, update.