Created
March 9, 2015 21:33
-
-
Save mvrmoreira/8224bd4143f256b569ac to your computer and use it in GitHub Desktop.
Método que veirica se a string passada está no formado +x55(x21)9999999999
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Método que veirica se a string passada está no formado +x55(x21)9999999999 | |
/// </summary> | |
/// <param name="phoneNumber"></param> | |
/// <returns></returns> | |
public bool CheckPhoneMask(string phoneNumber) { | |
bool returnValue = StringUtility.IsARegexMatch(@"^(?<DDI>\+?[0-9]{1,3})?\((?<DDD>[0-9]{1,3})\)(?<NUMBER>[0-9]{1,9})$", phoneNumber.Replace("-", "")); | |
return returnValue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment