Skip to content

Commit

Permalink
Merge pull request #7 from joaotonaco/patch-1
Browse files Browse the repository at this point in the history
CPF validation not working
  • Loading branch information
abensur authored Mar 1, 2024
2 parents 323b567 + 7c2ddb8 commit b29f985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const strictValidations = (digits: string) => {

const calculateCheckDigit = (digits: string) => {
const validation1 = [10, 9, 8, 7, 6, 5, 4, 3, 2];
const validation2 = [...validation1].slice(0, 9).concat([11]);
const validation2 = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2];

const getRest = (sum: number) => {
const remainder = sum % 11;
Expand Down

0 comments on commit b29f985

Please sign in to comment.