Validation rules in ValStorm allow you to enforce data integrity by preventing users (or automations) from saving records that don't meet your business criteria.
A validation rule uses the Formula Engine to evaluate a specific expression every time a record is created or updated.
| Component | Description |
|---|---|
| Name | A human-readable label for the rule (e.g., "Minimum Age Requirement"). |
| API Name | A unique identifier used by the system. |
| Rule Expression | The formula that must evaluate to TRUE for the data to be valid. |
| Error Message | The message shown to the user if the rule fails. This can be a static string or a dynamic formula. |
Always write your expression as the condition that makes the data valid.
{{record.amount}} > 0 (The record is valid if amount is positive).{{record.amount}} < 0 (This would block all positive amounts!).Use ISBLANK() to ensure you aren't running calculations on missing data that might cause a rule to fail unexpectedly.
IF(ISBLANK({{record.email}}), TRUE, CONTAINS({{record.email}}, "@"))Provide clear instructions on how to fix the error. Use dynamic formulas in error messages to show the user exactly what is wrong.
'Discount of ' & {{record.discount_pct}} & '% exceeds the limit of 20%.'If the Lead Source is "Referral", the "Referred By" field must not be empty.
IF({{record.lead_source}} == 'Referral', NOT(ISBLANK({{record.referred_by}})), TRUE)Ensure the "Birthdate" field is not set in the future.
{{record.birthdate}} <= TODAY()Ensure a "Probability" field is between 0 and 100.
{{record.probability}} >= 0 && {{record.probability}} <= 100Ensure a code starts with "ACT-".
LEFT({{record.account_code}}, 4) == "ACT-"