-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Card number and CVC lengths #688
Comments
For anyone interested:
|
4115680149517302486 |
thanks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When users add a CC number it instantly shows what type of card it is....but every type of card has its own required card number lengths and CVC lengths. Most cards CVCs are 3 digits, but Amex is 4. Most card lengths are 16, but some Visa's are 13 and Amex is 15.
Is there any method in cleave.js that can return the required card number lengths and the required CVC lengths?
I am doing form validation on a variety of fields, and prior to trying to use
cleave.js
my inputValidator strictly checked for cardNumberLength=16 (no spaces)) and cardCVCLength=3. But cleave.js inserts spaces into the card number taking a visa from 16 characters to 19....and an AMEX (which I wasn't testing for previously) is 15 characters, but with spaces would be 17 (or 18). So now my validator is causing problems when combined with cleave.js. Thus in order for both to cleanly to work, I need to be able to pass the card type lengths to my validator.As far as I can tell, cleave.js does not return those values.
The text was updated successfully, but these errors were encountered: