Cert++
Close

Format and range checks in validation formulas

Key Takeaway

Write the error condition formula to describe the bad value, because True means the data is invalid. Percent fields are divided by 100 inside formulas, so a rule for 0% to 100% compares to 0.0 and 1.0.

A validation rule stops a user from saving a record when the data breaks a standard you define. A format check tests the shape of a value, such as its length, its characters or a pattern like 999-99-9999. A range check tests whether a number, percent or date falls inside allowed limits.

How the error condition formula works

A validation rule checks data before a user can save a record. In its error condition formula, True means the data is invalid, so you write the formula to describe the bad value, not the good one. When the formula returns True, the user sees your error message.

Write the error condition formula as a plain Boolean expression. CloseDate < TODAY() is correct, but IF(CloseDate < TODAY(), TRUE, FALSE) is not.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Given a scenario, demonstrate the use of validation rules to meet stated business requirements

0/15

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.