-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Credit card validation #422
Comments
How do you envision this working? Is the use case "Make sure this number is really a Visa" or is it more along the lines of "Is the number a real credit card number"? |
I was initially just thinking a luhn check on the card number string. But maybe allowing the https://github.com/observing/creditcard/blob/master/docs/README.md |
I will take a simple and dependency free pull request, but this is such a special case feature that I don't want to go out of my way to support it. There is so much more to validating CCs. |
Fixed by #469. |
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Credit card validation is one of those things where regex does not quite cut it.
joi.string().creditcard()
perhaps?References:
http://en.wikipedia.org/wiki/Luhn_algorithm
http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=39698
The text was updated successfully, but these errors were encountered: