Skip to content

feat: Add support for alphanumeric CNPJ - #51

Draft
mileo wants to merge 1 commit into
masterfrom
feat/alphanumeric-cnpj
Draft

feat: Add support for alphanumeric CNPJ#51
mileo wants to merge 1 commit into
masterfrom
feat/alphanumeric-cnpj

Conversation

@mileo

@mileo mileo commented Aug 27, 2025

Copy link
Copy Markdown
Member

This commit introduces support for alphanumeric CNPJs, which are planned to be introduced in Brazil in 2026.

The changes include:

  • A new helper function _get_char_value to convert alphanumeric characters to their corresponding integer values for the validation algorithm.
  • Updated validar_cnpj and formata_cnpj to correctly handle alphanumeric characters.
  • Added new unit tests to verify the validation and formatting of alphanumeric CNPJs.

This commit introduces support for alphanumeric CNPJs, which are planned to be introduced in Brazil in 2026.

The changes include:
- A new helper function `_get_char_value` to convert alphanumeric characters to their corresponding integer values for the validation algorithm.
- Updated `validar_cnpj` and `formata_cnpj` to correctly handle alphanumeric characters.
- Added new unit tests to verify the validation and formatting of alphanumeric CNPJs.
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.

1 participant