priscillatrevizan/regex-generator

[FEATURE] Add CNPJ format validator generator

Open

#15 opened on Oct 11, 2025

View on GitHub
 (2 comments) (0 reactions) (1 assignee)JavaScript (11 forks)auto 404
hacktoberfesthacktoberfest2025

Repository metrics

Stars
 (13 stars)
PR merge metrics
 (PR metrics pending)

Description

1. Request Type

  • ✨ Feature Request

2. General Description

This issue proposes adding a new regex generator to the project: CNPJ format validator (format-only). Accept both formatted (00.000.000/0000-00) and unformatted (14 digits) inputs.


3. Specific Information

  • Problem to Solve: The project currently has CPF but lacks CNPJ format validation which is commonly required for business registrations in Brazil.
  • Suggested Solution: Implement generateCNPJRegex(options) where options.allowFormatting toggles between formatted and unformatted acceptance. Document that this is format-only and does not validate check digits.

Important:

When requesting this task from the maintainer, you can suggest applicable labels for this issue.

Contributor guide