Crates.io | phone-number-verifier |
lib.rs | phone-number-verifier |
version | 1.0.1 |
source | src |
created_at | 2021-08-02 10:01:45.661156 |
updated_at | 2021-08-02 10:09:12.586097 |
description | phone number verification library for rust |
homepage | |
repository | https://github.com/aniketfuryrocks/phone-number-verifier |
max_upload_size | |
id | 430363 |
size | 24,501 |
phone number verification library for rust
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}$
pub fn verify_phone_number_without_country_code(ph: &str) -> bool
^1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$