Skip to content

Kirby 6.0.0

$fileValidators->validateDuplicate()

Validates that no other file with the same name exists

$fileValidators->validateDuplicate(string $name, string|null $extension = null): void

Parameters

Name Type Default Description
$namerequired string no default value
$extension stringornull null If not passed, the current extension is kept

Parent class

Kirby\Guards\FileValidators