public function rules(){ return [ [ ['file'], 'file', 'extensions' => 'png, jpg, jpeg, gif, docx, xlsx, pdf, djvu, rar, zip, 7z,txt', 'maxSize' => Yii::$app->params['fileMaxSize'], //'skipOnEmpty' => false, // пропускать, если файл 0 размера 'maxFiles' => 5, //'tooLarge'=>'File has to be smaller than 50MB' ], [ ['file'], 'required' ], ]; } Files with the extension: rar, png are not loaded.
And, for example, files with the extension: txt, docx, pdf are loaded, although it seems that the rule is extensions .
Where is the error?