ContaAzul / creditcard.js

A simple credit card validation library in JavaScript
http://contaazul.github.io/creditcard.js/
Other
374 stars 82 forks source link

Bug number validation #131

Closed dtillner closed 3 years ago

dtillner commented 3 years ago

Want to request a feature or report a bug? Report a bug.

What is the current behavior?

If multiple valid card numbers appended the number is always valid.

If the current behavior is a bug, provide the steps to reproduce and, if possible, a minimal demonstration of the problem

let master = '5555555555554444';
let visa = "4242424242424242";
isValid(master + master); // returns true
isValid(master + visa); // returns true

What is the expected behavior?

It is invalid. Max length is 16/19 digits.

Which version of creditcard.js and which browser / OS are affected by this issue? This worked on previous versions of creditcard.js?

v3.0.5