function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MIDHUN G REDDYMIDHUN G REDDY 

Validations for phone number object

Hi,
please Explain with code to write Validations for phone number object..
Pramodh KumarPramodh Kumar
Please refer to this post
https://success.salesforce.com/answers?id=90630000000gulmAAA
Jakson MonteiroJakson Monteiro
Use formula;

NOT(ISNUMBER( Phone ))    // To check if there are numeric values entered
 
Amit Chaudhary 8Amit Chaudhary 8
Example 1
NOT(REGEX(Phone, "\\D*?(\\d\\D*?){10}"))

Exmaple 2:-
NOT(REGEX( Phone, "(\\d){10}"))
Example 3:0 https://help.salesforce.com/apex/HTViewSolution?id=000187896&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000187896&language=en_US)


Please let us know if this will help u

Thanks
Amit Chaudhary