Skip to content

Instantly share code, notes, and snippets.

@iltercengiz
Created February 10, 2015 08:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save iltercengiz/e249ab8efd95d9550c49 to your computer and use it in GitHub Desktop.
Checks validation of a given phone number
- (BOOL)isValidPhoneNumber:(NSString *)phoneNumberString {
NSError *error = nil;
NBPhoneNumber *phoneNumber = [self.util parse:phoneNumberString defaultRegion:self.region error:&error];
if (error) {
return NO;
} else {
return [self.util isValidNumber:phoneNumber];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment