Skip to content

Kirby 6.0.0

$pageValidators->validateDuplicate()

Validates that no other page or draft with the same slug exists

$pageValidators->validateDuplicate(string $slug, Site|Page|null $parent = null, bool $strict = false): void

Parameters

Name Type Default Description
$slugrequired string no default value
$parent Kirby\Cms\SiteorKirby\Cms\Pageornull null
$strict bool false If true, the page itself is not ignored, which is needed for pages that don't exist yet

Parent class

Kirby\Guards\PageValidators