Custom Field Validations - Salesforce
Allow Number to Be Increased but Not Decreased
FIELD | VALUE |
---|---|
Description: | Allows a custom field called Commit Amount to be increased but not decreased after initial creation. This rule uses the PRIORVALUE() function to compare the updated value of the field to its value prior to update. |
Formula: | |
Error Message: | Commit Amount cannot be decreased. |
Error Location: | Commit Amount |
California Driver's License
FIELD | VALUE |
---|---|
Description: | Ensures that a custom field called Drivers License is in the correct A9999999 format when the Mailing State is “CA”. |
Formula: | |
Error Message: | Invalid California driver's license format. |
Error Location: | Drivers License |
Force Users to Check “I Accept Terms” to Enter Certain Values
FIELD | VALUE |
---|---|
Description: | Uses a checkbox labeled “I accept terms” to force the user to select a checkbox in order to enter a value called Number of Days that exceeds their Paid Time Off (PTO) balance available. |
Formula: | |
Error Message: | Request will cause a negative PTO balance. You must accept Negative PTO Balance terms. |
Error Location: | I accept terms |
Prohibit Changes to a Field After It Has Been Saved
FIELD | VALUE |
---|---|
Description: | Prevents users from changing a custom field called Guaranteed Rate after it has been saved initially. |
Formula: | |
Error Message: | Guaranteed Rate cannot be changed. |
Error Location: | Guaranteed Rate |
Social Security Number Format
FIELD | VALUE |
---|---|
Description: | Validates that a custom text field called SSN is formatted in 999-99-9999 number format (if it is not blank). The pattern specifies:
|
Formula: | |
Error Message: | SSN must be in this format: 999-99-9999. |
Error Location: | SSN |
Valid Currency
FIELD | VALUE |
---|---|
Description: | Validates selected currency against an explicit subset of active currencies in your organization using the Currency picklist. Use this example if you only allow some of the active currencies in your organization to be applied to certain types of records. |
Formula: | |
Error Message: | Currency must be USD, EUR, GBP, or JPY. |
Error Location: | Currency |
Valid Credit Card Number
FIELD | VALUE |
---|---|
Description: | Validates that a custom text field called Credit_Card_Number is formatted in 9999-9999-9999-9999 or 9999999999999999 number format when it is not blank. The pattern specifies:
|
Formula: | |
Error Message: | Credit Card Number must be in this format: 9999-9999-9999-9999 or 9999999999999999. |
Error Location: | Credit Card Number |
Valid IP Address
FIELD | VALUE |
---|---|
Description: | Ensures that a custom field called IP Address is in the correct format, four 3-digit numbers (0-255) separated by periods. |
Formula: | |
Error Message: | Error: IP Address must be in form 999.999.999.999 where each part is between 0 and 255. |
Error Location: | IP Address |
Website Extension
FIELD | VALUE |
---|---|
Description: | Validates a custom field called Web Site to ensure its last four characters are in an explicit set of valid website extensions. |
Formula: | |
Error Message: | Web Site must have an extension of .com, .org, .net, or .co.uk. |
Error Location: | Web Site |
Comments
Post a Comment