docs/validators/Slug.md
Slug()Validates whether the input is a valid slug.
v::slug()->assert('my-wordpress-title');
// Validation passes successfully
v::slug()->assert('my-wordpress--title');
// → "my-wordpress--title" must be a slug
v::slug()->assert('my-wordpress-title-');
// → "my-wordpress-title-" must be a slug
Slug::TEMPLATE_STANDARD| Mode | Template |
|---|---|
default | {{subject}} must be a slug |
inverted | {{subject}} must not be a slug |
| Placeholder | Description |
|---|---|
subject | The validated input or the custom validator name (if specified). |
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 0.3.9 | Created |