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
LOKESH BACHULOKESH BACHU 

Can anyone tell me what is validation rule in salesforce

Esther OnemaEsther Onema
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 can contain a formula or expression 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.
example:

 User-added image

If my answer was helpful to you please mark it as best answer/solved.

Thank you,
Esther Onema.
Amit Chaudhary 8Amit Chaudhary 8
Hi,

I will recommend you to start learning salesforce with trailhead
1) https://developer.salesforce.com/trailhead/module/point_click_business_logic

Introduction to Validation Rules
Validation rules verify that data entered by users in records meet the standards you specify before they can save it. A validation rule can contain a formula or expression that evaluates the data in one or more fields and returns a value of “True” or “False.” Validation rules can also include error messages to display to users when they enter invalid values based on specified criteria. Using these rules effectively contributes to quality data. For example, you can ensure that all phone number fields contain a specified format or that discounts applied to certain products never exceed a defined percentage.

Creating a Validation Rule
1) Navigate to Customize | Your Object | Fields | Your Selected Field (such as Account Name), and under Validation Rules, click New.
2) Enter the following properties for your validation rule:
User-added image
3) To check your formula for errors, click Check Syntax.
4) Click Save to finish.

Please check below post for example
1) https://developer.salesforce.com/trailhead/point_click_business_logic/validation_rules

Let us know if this will help you