Commit c732a559 by Carsten Brandt

Merge pull request #4282 from dizews/patch-1

Update input-file-upload.md
parents 10747196 59c430ce
......@@ -133,13 +133,13 @@ public function rules()
### MIME type
It is wise to validate type of the file uploaded. FileValidator has property `$types` for the purpose:
It is wise to validate type of the file uploaded. FileValidator has property `$extensions` for the purpose:
```php
public function rules()
{
return [
[['file'], 'file', 'types' => 'gif, jpg',],
[['file'], 'file', 'extensions' => 'gif, jpg',],
];
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment