diff --git a/RMPhoneFormat/RMPhoneFormat.m b/RMPhoneFormat/RMPhoneFormat.m index 803dfe8..ed04573 100644 --- a/RMPhoneFormat/RMPhoneFormat.m +++ b/RMPhoneFormat/RMPhoneFormat.m @@ -699,6 +699,9 @@ - (CallingCodeInfo *)findCallingCodeInfo:(NSString *)str { - (NSString *)format:(NSString *)orig { // First remove all added punctuation to get just raw phone number characters. NSString *str = [RMPhoneFormat strip:orig]; + // no numbers, possibly text + if (str.length == 0) + return orig; // Phone numbers can be entered by the user in the following formats: // 1) +303