public function rules()
 {
     return CMap::mergeArray(array(array('file', 'required', 'on' => 'insert'), array('file', 'file', 'types' => 'jpg,gif,png,jpeg', 'allowEmpty' => true)), parent::rules());
 }
Example #2
0
 public function rules()
 {
     return CMap::mergeArray(parent::rules(), array(['image', 'file', 'types' => 'jpg, gif, png']));
 }