FileRules::validExtension()
Validates the file extension
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 |