Skip to content
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

Improve CPF generation and including RG #1

Conversation

hussani
Copy link

@hussani hussani commented Apr 1, 2015

  • Now CPF generator makes only valid CPF numbers
  • Person provider has RG generator
  • CNPJ was moved to Company provider

Any doubts, please tell me.

@igorsantos07
Copy link
Owner

Thanks man.
However, I'm not sure if you've noticed but you've merged a lot of undesired changes as well.
Furthermore, before seeing this I had already introduced your improvements to the original branch myself. Take a look at fzaninotto#545 :)

@hussani
Copy link
Author

hussani commented Apr 1, 2015

If you can, take a look on CPF generator. Your improvement only generator a random number, masked as a CPF. @ianrodrigues can generate random valid CPF.
I guess you can improve your PR with the Ian's code. =)

A @todo is also generate valid CNPJ number.

@igorsantos07
Copy link
Owner

I can't understand what's the difference you're pointing at. Both versions
use mod11 check digits to create valid document numbers. The biggest change
here is that I'm using the default random generator from Faker instead of
mt_rand, as the other algorithm does.
On 1 Apr 2015 11:30, "Hussani Oliveira" notifications@github.com wrote:

If you can, take a look on CPF generator. Your improvement only generator
a random number, masked as a CPF. @ianrodrigues
https://github.com/ianrodrigues can generate random valid CPF.
I guess you can improve your PR with the Ian's code. =)

A @todo https://github.com/todo is also generate valid CNPJ number.


Reply to this email directly or view it on GitHub
#1 (comment).

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.

5 participants