Skip to content

Conversation

@mileo
Copy link
Member

@mileo mileo commented Aug 27, 2025

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.

2 participants