Cnpj()
Validates the structure and mathematical integrity of Brazilian CNPJ identifiers.
Ignores non-digit chars, so use ->digit() if needed.
v::cnpj()->assert('00394460005887');
// Validation passes successfully
v::cnpj()->assert('12ABC34501DE35');
// Validation passes successfully| Mode | Template |
|---|---|
default |
{{subject}} must be a CNPJ |
inverted |
{{subject}} must not be a CNPJ |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Identifications
| Version | Description |
|---|---|
| 3.0.0 | Templates changed |
| 0.3.9 | Created |