Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 1.3 KB

File metadata and controls

54 lines (37 loc) · 1.3 KB

Slug

  • 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

Templates

Slug::TEMPLATE_STANDARD

Mode Template
default {{subject}} must be a slug
inverted {{subject}} must not be a slug

Template placeholders

Placeholder Description
subject The validated input or the custom validator name (if specified).

Categorization

  • Strings

Changelog

Version Description
3.0.0 Templates changed
0.3.9 Created

See Also