Skip to content

Kirby 5.0.1

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
$slugrequired string no default value

Exceptions

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

Parent class

Kirby\Cms\PageRules