Skip to content

Kirby 4.5.0

PageRules::validateSlugLength()

Ensures that the slug is not empty and doesn't exceed the maximum length to make sure that the directory name will be accepted by the filesystem

PageRules::validateSlugLength(string $slug): void

Parameters

Name Type Default
$slug * string

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the slug is empty or too long

Parent class

Kirby\Cms\PageRules