CValidator notOn option

In some particular cases it may be useful to have a notOn (scenario) options for CValidator.

In my case, this happens when I’m creating the same alarm for many entities with a CGridView checkboxcolumn form. As alarms have to validate its foreign key in every situation I have it as required field in the Model. However, when creating multiple alarms at the same time, this shouldn’t be checked as what I need to validate are the other fields.

I believe this does not carry a big change in the framework so maybe it’s a nice feature to add for this specific type of situations.

What I’m currently doing to solve this issue is extending the model without that validation rule…