Skip to content

Commit

Permalink
rm comments
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Nov 5, 2024
1 parent 5642beb commit 3615239
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/ValidationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ function validateCardNumber(value: string): boolean {
if (shouldDouble) {
intVal *= 2;
if (intVal > 9) {
intVal -= 9; // Same as intVal = 1 + (intVal % 10)
intVal -= 9;
}
}

sum += intVal;
shouldDouble = !shouldDouble; // Toggle doubling for the next position
shouldDouble = !shouldDouble;
}

return sum % 10 === 0;
Expand Down

0 comments on commit 3615239

Please sign in to comment.