public function rules()
{
return [
[['price'], 'required', 'when'=>function($model){
return ($model->price === null)?false:true;
}],
[['price'], 'integer'],
];
}
//это во view
$this->registerCss('
body {background-color:#fff;}
');
//это во view
$this->registerCssFile('path/to/myfile');
<?php
return [
'email1'=>['someData'=>'natasha'],
'email2'=>['someData'=>'petya'],
];