Skip to content

fix(br): support Brazilian alphanumeric CNPJ format in masks, filters and validation#361

Open
gilsonjoanelo wants to merge 7 commits into
assisrafael:masterfrom
gilsonjoanelo:master
Open

fix(br): support Brazilian alphanumeric CNPJ format in masks, filters and validation#361
gilsonjoanelo wants to merge 7 commits into
assisrafael:masterfrom
gilsonjoanelo:master

Conversation

@gilsonjoanelo

Copy link
Copy Markdown

Description

This PR updates the CNPJ mask, filters, and validation logic to support the new Brazilian Alphanumeric CNPJ standard issued by the Federal Revenue (RFB), according to the official specifications and simulator provided by Receita Federal.

Changes

  • Updated clearValue and regexes to preserve letters (A-Z) while formatting.
  • Fixed cpfCnpjMask and cnpjMask filters to handle alphanumeric strings properly.
  • Updated the CNPJ checksum validation algorithm to map ASCII characters according to the official RFB specifications.

Fixed a blocking runtime error (Cannot find module 'date-fns/locale/pt-BR') caused by version mismatch and case-sensitivity issues within the date-fns@2.0.0-alpha.7 dependency graph during bundle compilation.
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