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

Union pay cards with 81 range fails isCreditCard check #1680

Closed
darrell-roberts opened this issue May 27, 2021 · 1 comment · Fixed by #1715
Closed

Union pay cards with 81 range fails isCreditCard check #1680

darrell-roberts opened this issue May 27, 2021 · 1 comment · Fixed by #1715

Comments

@darrell-roberts
Copy link

Describe the bug
Using the 81* range UNION Pay card numbers does not pass isCreditCard check

Examples
Sample Test Cards: https://docs.adyen.com/development-resources/test-cards/test-card-numbers#china-unionpay

validator.isCreditCard('8171999900000000021')
false

The problem is the initial regex in https://github.com/validatorjs/validator.js/blob/master/src/lib/isCreditCard.js#L4

Additional context
Validator.js version: 13.6.0
Node.js version: 14
OS platform:l inux

@shreyassai123
Copy link
Contributor

Hey! I'd like to take this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants