Skip to content

Kirby 3.8.4

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

Parent class

Kirby\Cms\FileRules