Creating validation rules
The cool thing about validation rules is that they can be easily adapted to your business needs by validating record fields based on diverse conditions on the current user and other fields in the object hierarchy you want to validate.
A validation rule basically works with criteria shaped by a formula that correlates fields by generating a single true or false value, indicating whether the criteria have been matched or not, and so whether the record should raise a validation error or not.
Tip
Remember that a validation rule's criteria must always return a Boolean value (that is, true or false) and that true
indicates that the rule found an error condition.
This is the basic flow involving validation rules:
The user creates/updates a record.
They then click the Save button.
The engine checks all active validation rules on that object.
If no rule is raised, the record is successfully saved on the database.
If at least one rule...