rs-card-validate
Detects and validates credit card numbers (type of card, number length and Luhn checksum).
Important notice: this is a complete rework of @rprotasov initial work, supporting more card providers and containing important validation fixes.
🇫🇷 Crafted in Brest, France.
Supported providers
Debit cards:
- Visa Electron
- Maestro
- Forbrugsforeningen
- Dankort
Credit cards:
- Visa
- MasterCard
- American Express
- MIR
- Diners Club
- Discover
- UnionPay
- JCB
Install library
In your Cargo.toml
:
[]
= "2.3"
Validate a number
extern crate card_validate;
use Validate;
let card_number = "5236313877109142";
match from