Validation rules (block saves by condition)
Create no-code rules that prevent saving a record when a business condition is violated.
Validation rules ensure data quality: when someone tries to save a record that violates a rule, the system blocks it and shows your message. Create them in Settings → Validation rules, without code.
How a rule works
You write a CONDITION (an expression like in formulas). When that condition results in TRUE, the record is considered invalid and is not saved. That is why the condition describes what is WRONG.
- Choose the object (e.g. Opportunity).
- Give the rule a name (e.g. "Discount above the limit").
- Write the condition using the fields' API Names (e.g. discount > 30).
- Write the error message the user will see (e.g. "A discount above 30% requires approval.").
- Save. The rule starts out active; use the "Active" box to turn it on/off without deleting it.
The language of conditions
- Operators: + − * / % and & (text), comparisons = ≠ (use <>) < > <= >=.
- Functions: IF, AND, OR, NOT, ROUND, ABS, MIN, MAX, FLOOR, CEIL, CONCAT, COALESCE, LEN.
- Reference fields by their API Name (not by the label). Empty fields count as 0 (number) or "" (text).
Example: An opportunity cannot be won without a value: AND(status = "won", amount <= 0) → "Enter the value to mark it as won." Or require a reason on loss: AND(status = "lost", LEN(loss_reason) = 0) → "Enter the reason for the loss."
💡 The rule applies on creation and on edit, and runs after the calculated fields (formulas), so you can validate against the already calculated value. Inactive rules block nothing.