Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2015 08:47
What would you like to do?
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