$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 |