FileRules::validExtension()
Validates the file extension
FileRules::validExtension(Kirby\Cms\File $file, string $extension): bool
Parameters
| Name | Type | Default |
|---|---|---|
| $file * | Kirby\Cms\File |
– |
| $extension * | string |
– |
Return type
bool
Exceptions
| Type | Description |
|---|---|
Kirby\Exception\InvalidArgumentException |
If the extension is missing or forbidden |