iPhone OSX

iOS/OSX – validate phone number

I need to check whether i can use the phone number or not in iOS/OSX.
This is what i found solution at the stack over flow.

NSPredicate *phoneTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", phoneRegex];
BOOL phoneValidates = [phoneTest evaluateWithObject:phoneNumber];
NSString *phoneRegex = @"^((\\+)|(00))[0-9]{6,14}$";


댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다

Back To Top