A validator for greek social security number (AMKA)
Add amka
under [dependencies]
in your Cargo.toml
:
[dependencies]
amka = "1.1.0"
Use the validator:
use amka;
// An invalid AMKA
let (is_valid, err) = amka::validate("09095986680");
assert!(!is_valid);
println!("{}", err);
// An valid AMKA
let (is_valid, err) = amka::validate("09095986684");
assert!(is_valid);
assert_eq!("", err)