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| Mode | Template |
|---|---|
default |
{{subject}} must be a Luhn number |
inverted |
{{subject}} must not be a Luhn number |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Identifications
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 2.0.0 | Created |