I want to have a model with a set of default rules that just don’t apply in a specific scenario. If the model is used in 5 pages, I want 4 of them to apply the rules and one to not apply them, do I have to
public function rules()
{
return array(
array('property', 'required', 'on'=>'scenario1, scenario2, scenario3, scenario4'),
array('property', 'length', 'max'=>255),
);
}
or maybe I can
public function rules()
{
return array(
array('property', 'required', 'on'='!scenario5'),
array('property', 'length', 'max'=>255),
);
}
?