Skip to content

CNPJ alphanumeric (Brasil)#282

Merged
dereuromark merged 6 commits into
cakephp:5.xfrom
rochamarcelo:cnpj-alpha
Jun 30, 2026
Merged

CNPJ alphanumeric (Brasil)#282
dereuromark merged 6 commits into
cakephp:5.xfrom
rochamarcelo:cnpj-alpha

Conversation

@rochamarcelo

Copy link
Copy Markdown
Contributor

Brazil has introduced an alphanumeric CNPJ format. This PR updates the plugin to recognize and process both the new alphanumeric format and the existing numeric format. The alphanumeric CNPJ will be assigned exclusively to new registrations starting in July 2026, for this reason we must accept both formats.

What's included

  • Updated CNPJ validation to support for alphanumeric characters
  • Backward compatibility with numeric CNPJs
  • New test coverage for alphanumeric format

Resources:
https://www.legisweb.com.br/legislacao/?id=466532
https://www.gov.br/receitafederal/pt-br/centrais-de-conteudo/publicacoes/documentos-tecnicos/cnpj/manual-dv-cnpj.pdf/@@download/file

Comment thread src/Validation/BrValidation.php Outdated
@dereuromark dereuromark merged commit aeccf97 into cakephp:5.x Jun 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants