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
Muneendar baddamMuneendar baddam 

phone number starts with 9 only

sandeep sankhlasandeep sankhla
Hi Muneendar, can you explain your need? Do I need validation which should validate if phone number starts with 9 only ??
Sagar PareekSagar Pareek
Seems like you want to implement a validation rule to ensure the phone number should start from 9 . 
VicksVicks
Use REGEX() to implement this.
refer salesforce validation Best practise.
Muneendar baddamMuneendar baddam
Yes.I need to validate phone number field.That is  phone number starts with 9 only(like 9088776666).if any number like 8880000000,need to through error @sandeep
Sampath KumarSampath Kumar
Hi Muneedar,

Write a validation rule with below rule

!CONTAINS("9", LEFT( TEXT(contactNumber__c) ,1))

> contactNumber__c is the phone number field which is number generic.

Mark this as best answer if this solves your query.

Regards
Sampath Kumar Goud
 
abu saleh khan 8abu saleh khan 8
How to achive it Through apex code?