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
Akshay Bhujbal 6Akshay Bhujbal 6 

How to create a validation rule for mobile number of contact should not be null and not greater that or less that to 10 digits

Best Answer chosen by Akshay Bhujbal 6
Maharajan CMaharajan C
Use the below formula:

OR( (ISBLANK(Phone)), LEN(Phone) <> 10 )

Thanks,
Maharajan.C


 

All Answers

Maharajan CMaharajan C
Use the below formula:

OR( (ISBLANK(Phone)), LEN(Phone) <> 10 )

Thanks,
Maharajan.C


 
This was selected as the best answer
Andrew GAndrew G
Noting that we are saying digits:
 
OR( 
ISBLANK( Phone__c),
NOT( REGEX( Phone__c , "[0-9]{10}") ) 
)

Regards
Andrew
Akshay Bhujbal 6Akshay Bhujbal 6
Thank you for your reply :)