-
Notifications
You must be signed in to change notification settings - Fork 275
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
Not valid card shows how valid #125
Comments
My quick guess is it’s because you’re only checking if (result.luhn_valid == true) {
$('#payfort_fort_card_number').addClass('valid'); You’re not checking if the length is valid: (you don’t need to compare if (result.luhn_valid && result.length_valid) { There’s a shortcut to check both at once: if (result.valid) { |
Thank you @PawelDecowski for so fast answer, will try to test with it |
@PawelDecowski i have no idea why it happens... if i add 2 wrong last digit on the main page jquerycreditcardvalidator.com my card is validating right, and if remove last digit or change on wrong. |
Visa numbers can be between 13 and 19 digits long. You just happened to end up with a 14 digit long number that has a valid Luhn checksum after removing the last 2 digits. It’s pure chance. Try another number and it’ll most likely fail.
|
will check.... @PawelDecowski This validator can work with payfort_fort ? anyway i have weird bug https://prnt.sc/l9smn2 |
Hello @PawelDecowski and developer.
If somebody knows how to resolve this issue please explain to me?
I have a simple input field.
Link on the html
image how it works on my dev
My problem is:
I input number, then with regExp is converting to string with after each 4 digits spaces.
and for example, I added this number 4000 0000 0000 0002 from the main page
then tried ty change last digit and this is not valid, - ok
but i tried to delete last 2-3 digit scipt show that number is valid. i don't understand why on the main page the script works, on my example not.
My script I think very simply.
Code here
The text was updated successfully, but these errors were encountered: