Crates.io | afm-rs |
lib.rs | afm-rs |
version | 0.1.1 |
source | src |
created_at | 2020-12-29 17:36:40.94369 |
updated_at | 2020-12-29 22:15:59.521144 |
description | A validator for greek tax identification number (ΑΦΜ) |
homepage | |
repository | https://github.com/zoispag/afm-rs |
max_upload_size | |
id | 328856 |
size | 6,038 |
A validator for greek tax identification number (ΑΦΜ)
Add afm-rs
under [dependencies]
in your Cargo.toml
:
[dependencies]
afm-rs = "0.1.1"
Use the validator:
use afm_rs;
// An invalid AFM
let (is_valid, err) = afm::validate("123456789");
assert!(!is_valid);
println!("{}", err);
// A valid AFM
let (is_valid, err) = afm::validate("997788278");
assert!(is_valid);
assert_eq!("", err)