Commit Graph

1 Commits

Author SHA1 Message Date
Evgeniy Tkachenko
96bf647752 Add new guide upload-file
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?
2014-04-04 11:27:12 +03:00