Skip to content

Commit

Permalink
Merge pull request #12 from pouriya/ref-phone-number
Browse files Browse the repository at this point in the history
ref: phone number
  • Loading branch information
ali77gh authored Dec 9, 2023
2 parents 2809c02 + b2f57b8 commit 97bad70
Show file tree
Hide file tree
Showing 2 changed files with 345 additions and 199 deletions.
4 changes: 2 additions & 2 deletions src/phone_number/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ pub mod operators;

use regex::Regex;

const MOBILE_REGEX: &str = r#"^(\+98|98|0098|0)?9(\d{2})\d{7}$"#;
pub const PREFIXES: [&str; 4] = ["+98", "98", "0098", "0"];
static MOBILE_REGEX: &str = r#"^(\+98|98|0098|0)?9(\d{2})\d{7}$"#;
pub static PREFIXES: [&str; 4] = ["+98", "98", "0098", "0"];

/// This is a simple function that checks if a phone number valid or not
///
Expand Down
Loading

0 comments on commit 97bad70

Please sign in to comment.