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

Return true when the card number is zero, wtf ? #14

Closed
mel-florance opened this issue Mar 22, 2017 · 2 comments
Closed

Return true when the card number is zero, wtf ? #14

mel-florance opened this issue Mar 22, 2017 · 2 comments

Comments

@mel-florance
Copy link

mel-florance commented Mar 22, 2017

As in the title, the function returns true with a card number of zero, (or multiple zeros).

I dont know what to think, it look like a major issue.

I didnt search further in the library code to find a solution yet, but soon i'll try.

@JamesEggers1
Copy link
Owner

This issue is how the checksums are calculated. Since the validation algorithm adds the digits and multiples of the digits together and then checks that it's divisible by 10, a sum of 0 would pass the validation.

I'll add tests and a validation to test that the summation of algorithm isn't 0.

@JamesEggers1
Copy link
Owner

This is now fixed in v2.3.0 of the package.

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

No branches or pull requests

2 participants