mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 09:47:25 +08:00
1. UploadedFile::getInstances($model, 'file'); sees only one file if not set ```'file[]'```
```php
<?= $form->field($model, 'file[]')->fileInput(['multiple' => '']) ?>
```
2. ```$form->errorSummary(..)``` not return all errors of file attribute, but only the last.
So I had to invent.
```php
if ($model->hasErrors()) {
echo '<pre>';
print_r($model->getErrors());
echo '</pre>';
}
```
So it should be?
This folder contains official Yii 2 guides documentation.
To add new guide, take the following steps:
- Create
guide-nameand put there relevant documentation; - If guide has more then one word in name, then it should be with dashes, like:
console-fixture.md,module-debug.md; - If your guide is for console commands, than its name should follow convention:
console-{command}.md; - If your guide is for custom modules, than its name should follow convention:
module-{moduleName}.md.