One silly question on model scenarios

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),

	);

}



?

so, anyone got an idea if this is doable?

Nope, I don’t think so… as far as I know, it is a must, do define one by one

Have you try it? what’s the result?

former one will work as for i know, but instead of that you can define two different scenarios and use on for your four similar pages and other one for different page.