rs-card-validate
Detects and validates credit card numbers (type of card, number length and Luhn checksum).
Important notice: this is a fork of @rprotasov initial work, to make it usable in Rust projects.
Install library
In your Cargo.toml
:
[]
= "0.2"
Validate a number
extern crate card_validate;
use Validate;
let card_number = "343380440754432";
let result = new;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;