Hey guys, today in this post we are going to learn about Validation Rule on Lead to check “Mobile” field and mobile will take only numerical values don’t accept text type in Salesforce.
Validation Rules verify that the data a user enters in a record meets the standards you specify before the user can save the record. A Validation Rule contains a formula that evaluates the data in one or more fields and returns a value of “True” or “False”. Validation Rules also include an error message to display to the user when the rule returns a value of “True” due to an invalid value. To Know more details about Validation Rule, Click Here.
Final Output →
Other related post that would you like to learn in Salesforce
- Find the below steps ▾
Lead Settings
Step 1:- Require Validation for Converted Leads on Lead Settings
Make sure this setting is enabled, otherwise Validation Rule on Lead conversion will be ignored.
Follow the below steps to enable Lead Settings
Setup >> Quick Find >> Lead Setting
Mobile only numerical values validation
Step 2:- Create a validation rule in Lead using Error Condition Formula.
Follow the below steps to create validation rule on Leads
Setup >> Object Manager >> Lead >> Validation Rule >> Mobile_only_numerical_values_validation
Don’t forgot to make enabled Active of checkbox.
IF(MobilePhone<>"",NOT(ISNUMBER(MobilePhone)),FALSE)
Set Error Message in Validation Rule
Step 3:- Set Error Message and Error Location in Validation Rule.
What is the range validation rule?
RangeRule: - A validation rule that demands the target value be within the specified value range (including the range's end points). To specify the range that the validated value must match, set the rule's min and max configuration properties. Note that the specified range can be on a date-time or numeric scale.
How many types of validation rules are there in Salesforce?
Validation rules are one of the five rule types in Salesforce which are processed in this sequence: Validation Rules → Assignment Rules → Auto-response Rules → Workflow Rules → Escalation Rules.
Which validation control is used for mobile number?
Phone number validation uses the DataAnnotations namespace, which has two validation attributes: DataType and Phone. You should use the DataType in your model class if your MobilePhone field is of a simple type. The DataType enumeration provides a list of standard data types supported by the class.
Related Topics | You May Also Like
Our Free Courses →
👉 Get Free Course →
![]() 📌 Salesforce Administrators 📌 Salesforce Lightning Flow Builder 📌 Salesforce Record Trigger Flow Builder |
👉 Get Free Course →
![]() 📌 Aura Lightning Framework 📌 Lightning Web Component (LWC) 📌 Rest APIs Integration |