Hi I need phone number validation for France.
Valid format : +262#########
Validation done in textDidChang: so every I need to check every number belong to above number.
My Regex below
[[NSPredicate predicateWithFormat:@"SELF MATCHES %@", @"+2?6?2?\d?\d?\d?\d?\d?\d?\d?\d?\d?"] evaluateWithObject:@"+262989878989"]
While execute this line app crash
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Can't do regex matching, reason: (Can't open pattern U_REGEX_RULE_SYNTAX (string 2, pattern +2?6?2?\d?\d?\d?\d?\d?\d?\d?\d?\d?, case 0, canon 0))'
Help me to fix this.