-
-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brazil tax ID numbers #3414
Comments
Thank you for your feature proposal. We marked it as "waiting for user interest" for now to gather some feedback from our community:
We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements. We will start the implementation based on:
We do this because:
|
In Brazil the CPF (Cadastro de Pessoas Físicas) is an 11‐digit taxpayer identification number with 2 checkdigits and RG is used on national identity cards https://en.wikipedia.org/wiki/Brazilian_identity_card |
The more generic solution would be something like a https://en.wikipedia.org/wiki/National_identification_number which could implement for different locales. But there would likely be a fair amount of custom code for things like checkdigits. |
In this case generic is a good option too, but I will continue to need of this specific implementation and should be one for each country but can be implemented on demand. I can try it, for now I'm with short time, but I can try implement it here. |
We normally wait until an issue has 10 upvotes in the "waiting for user interest" before we consider it for inclusion. If you can share any code snippets from a custom implementation that will definitely help in the future. You can probably use a mix of existing faker helper / string methods, plus some custom code for the checkdigits pseudocode const base = faker.helpers.replaceSymbols('###.###.###-') //'856.032.749-'
const checkdigits = calculateCheckDigitsForCPF(base)
const cpf = base+checkdigits |
Clear and concise description of the problem
In Brazil in common use fake
CPF
andRG
while testing and so forth. This are documents like TaxID.Is a easy algo to implement to generate both and can be very helpful!
Suggested solution
Just implement the algorithm to generate this and others known documents around the world!
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: