CActiveform Problem







$valid= $model->validate();

$valid = $artist->validate() && $valid;

$valid = $album->validate() && $valid;

i have something like this and the thing is for artist there are other attributes and i don’t want them to be required in this form but i want them in other forms so what can i do?

define scenarios ( and in each Model’s validation section define the validation for the respective scenario such as

array('email', 'email', 'on' => 'update'),

This will validate email attribute on update scenario only and will skip for the others