-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
Description
I'd like to contribute a validator for Brazilian CPF (Cadastro de Pessoa Física),
Brazil's individual taxpayer registry identification similar to SSN in the US.
Rationale
- CPF is widely used in Brazilian applications
- Complements the existing CNPJ validator (which I recently contributed in #YOUR_PR_NUMBER)
- High demand from Brazilian developer community
Proposed Implementation
- Add
isCPF()function following the same pattern as existing tax ID validators - Validation algorithm: Module 11 with check digits (similar to CNPJ)
- Format: XXX.XXX.XXX-XX (11 digits total, last 2 are check digits)
- Accept formatted (with dots/dash) and unformatted inputs
References
- Used by millions of Brazilian citizens and companies
I'm ready to implement this if the maintainers approve. Happy to discuss any
implementation details or alternative approaches.
joaopedrodcf
Metadata
Metadata
Assignees
Labels
No labels