2 stable releases
1.0.1 | Aug 2, 2021 |
---|
#17 in #phone-number
Used in phone_type
24KB
681 lines
Phone Number Verifier
phone number verification library for rust
With Country Code
pub fn verify_phone_number_with_country_code(ph: &str) -> bool
^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$
Without Country Code
pub fn verify_phone_number_without_country_code(ph: &str) -> bool
^1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$
Dependencies
~2.2–3MB
~55K SLoC