-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(isCpf): Add Brazilian CPF validation #1755
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1755 +/- ##
===========================================
- Coverage 100.00% 99.90% -0.10%
===========================================
Files 102 103 +1
Lines 2029 2053 +24
Branches 457 462 +5
===========================================
+ Hits 2029 2051 +22
- Misses 0 1 +1
- Partials 0 1 +1
Continue to review full report at Codecov.
|
fedeci
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a sort of VAT number, right?
yes, sort of. |
|
Because I think it would be better to add it to isVAT, then. |
its not simple as VAT, CPF Validation require some math calculation, and works only for Brazil. |
|
Of course it is exclusive to brazil, also in Italy it is called IVA instead of VAT, but the meaning is practically the same. I'd suggest you to implement it in the |
It will lose its meaning, vat is tax identification number, cpf is registration of individuals. No Brazilian will search for VAT Validation, they will search for CPF Validation. I myself didn't know about the existence of VAT until this PR |
|
Let's ear maintainer's opinions :) |
sure :) |
|
Hello @ygorazambuja and thank you for your PR! |
|
What is the difference between isTaxID and isVAT? |
Honestly i don't know, in my country Tax ID and VAT number are the same thing (it's called tax registration number) but it looks like many countries have two separated identifiers. May be we need to dig into this and merge the two validators! |
|
In Italy they are the same number. Probably it is different just in GB? |
it's like that, but I still don't agree with the name of the method, it makes it difficult to adhere to the library (in relation to this specific method of course). I will close the PR so, thanks for the feedbacks. |
feat(isCpf)
Add Brazilian CPF Validation (Cadastro de Pessoas Fisicas)
Widely used in programs that use personal registration