Nif
February 3, 2026 · View on GitHub
Nif()
Validates Spain's fiscal identification number (NIF).
v::nif()->assert('49294492H');
// Validation passes successfully
v::nif()->assert('P6437358A');
// → "P6437358A" must be a NIF
Templates
Nif::TEMPLATE_STANDARD
| Mode | Template |
|---|---|
default | {{subject}} must be a NIF |
inverted | {{subject}} must not be a NIF |
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.2.0 | Created |