Salesforce Regex Validation Rule in International Format

Create validation rule on phone or mobile field on any Account or Contact object on salesforce.Then it will check for whether phone number is given as empty or given in proper format or not.

NOT(REGEX( Phone , "^\\s*(?:\\+?(\\//*|\\d{1,3}))?([-. (\\d*]*(\\d{3})[-. )]*)?((\\d{3})[-. ]*(\\d{2,4})(?:[-.x ]*(\\d+))(?:\\s*(?:#|\\//*|\\\\|,|-| |x|\\|.?|ext\\.?|extension\\.?|\\*)*([-. \\//\\\\(\\d*]*(\\d{1,4})[-. )]*)\\s*(\\d|#+))?)\\s*$"))

Useful Link : https://help.salesforce.com/articleView?id=000181563&language=en_US&type=1


Salesforce Validation Rule
Account Validation rule

Comments

Popular posts from this blog

Community/Experience Cloud Interview Questions

Script to delete multiple records using Apex salesforce

Change Owner / Update record using Lightning Custom Button Salesforce