public function isValid(string $slug, bool $strict = true): bool
    {
        return (bool) preg_match($strict ? $this::SLUG_STRICT_REGEX_VALID : $this::SLUG_REGEX_VALID, $slug);
    }
public function isValid(string $slug, bool $strict = true): bool
    {
        return (bool) preg_match($strict ? $this::SLUG_STRICT_REGEX_VALID : $this::SLUG_REGEX_VALID, $slug);
    }
public function isValid ( string $ slug , bool $ strict = true ) : bool { return ( bool ) preg_match ( $ strict ? $ this :: SLUG_STRICT_REGEX_VALID : $ this :: SLUG_REGEX_VALID , $ slug ) ; }
Validate slug.

@since 150424 Initial release.

@param string $slug   Slug.
@param bool   $strict Strict?

@return bool True if slug is valid.
Validate slug .