Any Chance For Dynamic Add/remove Rules

Is there any chance we can see more dynamic manipulation of validation rules in Yii2. Something like $model->addValidationRule() / $model->removeValidationRule() on the fly? This will simplify the rules logic tremendously in complex situations and shouldn’t be an overhead for the overall application.

Model::getValidators() returns an ArrayObject instance that you can manipulate as you like.

This also works for yii1.1 via CModel::getValidatorList() where you get a Clist object.

Ah… I’ve totally missed this. Thanks CeBe