Validate phone number ios

前端 未结 9 1743
温柔的废话
温柔的废话 2020-12-10 00:42

I need to validate an international phone number.

I know its difficult to validate an international phone number, so I\'m going to keep it simple:

+

9条回答
  •  离开以前
    2020-12-10 01:30

    NSString *phoneRegex = @"^((\\+)|(00))[0-9]{6,14}|[0-9]{6,14}$";

    This is tested RegularExpression This will accept with country code OR without country code

提交回复
热议问题