yiisoft/yii — Issue #428: Expression property in validation rules
Author: MonkeyMaster
Created: 2012-03-02 08:02:23+00:00
State: open

It would be great to have "expression" property in validation rules just like in CAccessRule (a PHP expression whose value indicates whether this rule should be applied).
There are cases when scenario is not enough, for example, additional check is needed based on some model attributes.

This could be easily added to CValidator::applyTo()