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

Variable length validation for cards #144

Open
MalcolmScoffable opened this issue Jul 6, 2018 · 2 comments
Open

Variable length validation for cards #144

MalcolmScoffable opened this issue Jul 6, 2018 · 2 comments

Comments

@MalcolmScoffable
Copy link

Hi there,
I'm currently integrating this library into my app, and it's working really well so far. However, one potential issue that I've got is that I do not see any way of handling variable length card numbers (i.e., the VISA spec states that VISA card numbers can be between 13 - 19 digits, however the standard Caishen validation assumes 16 for VISA).

I was wondering if anyone is aware if there is any way of supporting this in the library, and whether this is something that we should even be supporting? I was alerted to the fact that this isn't handled as some of my test cards are 13 digits.

Any ideas on this would be really useful.

@HardikDG
Copy link

any update on this?
I have a card with 19 digits but it is only taking till 16

@Vasia89
Copy link

Vasia89 commented Dec 6, 2019

I have added some possibility to use variable card length. You could check it in my repo.
I did not use UI features from Caishen, so it could have some problems. But card validation and formatting should works.

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

3 participants