Validate Mobile Number with Country code followed by 10 digits

administrationregular-expressionsvalidation-rule

I am new to salesforce . I have MobilePhone field in Contact. I need to validate the MobilePhone Field such that it must include (+1, +91, +355) followed by 10 digits mobile number.

NOT(REGEX(MobilePhone, "\D*?(\d\D*?){10}")) – This Regex works for 10 digits.
How can I write this regex with country code using validation Rule.
Ex: +19878767657 , +919878787678

Best Answer

Use [+][0-9]{1,3}[0-9]{10}


[+] to check '+' at start

[1-9]{1,3} to check up to 3 digits for Country code

[0-9]{10} to check 10 digits for Phone Number


Related Topic