public function BrazilianIdsServiceInterface::validateCnpj in Brazilian IDs 8
Validates CNPJ numbers.
Parameters
string $value: The value of the CNPJ number to be validated.
array $error: If provided, it is filled with the error message at $error['message'] if any.
Return value
bool Returns TRUE if the CNPJ number is valid. Otherwise, returns FALSE.
1 method overrides BrazilianIdsServiceInterface::validateCnpj()
- BrazilianIdsService::validateCnpj in src/
BrazilianIdsService.php - Validates CNPJ numbers.
File
- src/
BrazilianIdsServiceInterface.php, line 41
Class
- BrazilianIdsServiceInterface
- Defines the interface of the Brazilian IDs service.
Namespace
Drupal\brazilian_idsCode
public function validateCnpj($value, array &$error = []);