Пока я это реализовал через переопределение метода validate в модели, присваивая необходимый сценарий в зависимости от условий. Выглядит он так:
Код: Выделить всё
public function validate($attributes=NULL,$clearErrors=true)
{
$result = true;
if($this->payment_type==0) {
$this->scenario = 'bankRequired';
$result = parent::validate(array( 'account_holder','account_number','bank_name','bank_code'),false) && $result;
}
if($this->settlement==0) {
$this->scenario = 'previousRequired';
$result = parent::validate(array('previous_supplier','previous_client_number','counter_number','previous_volume')
,false) && $result;
}
unset($this->scenario);
return parent::validate($attributes,false) && $result;
}