Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.34 KB

File metadata and controls

55 lines (38 loc) · 1.34 KB

Luhn

  • Luhn()

Validate whether a given input is a Luhn number.

v::luhn()->assert('2222400041240011');
// Validation passes successfully

v::luhn()->assert('respect!');
// → "respect!" must be a Luhn number

Templates

Luhn::TEMPLATE_STANDARD

Mode Template
default {{subject}} must be a Luhn number
inverted {{subject}} must not be a Luhn number

Template placeholders

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

Categorization

  • Identifications

Changelog

Version Description
3.0.0 Templates changed
2.0.0 Created

See Also