I have this rule on the model:
array('pass','required','on'=>'create'),
it seems that the on create action doesnt work…
I have this rule on the model:
array('pass','required','on'=>'create'),
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.