How to Add Validation Rules to Fields

View our short instructional guide to learn how to apply validation rules to your data fields.

00:01: Hi! This guide will walk you through adding validation rules to fields. From updating the field to testing the rule, you'll learn how to ensure data accuracy and streamline processes utilizing validation rules. 00:19: 2. For this example, we'll use the Inventory Manager sample app. Users of this app are required to input a starting inventory of each product they add. To ensure that users cannot submit a product without a starting inventory value, we'll apply a validation rule to the field. To begin, you can directly select "Validation Rules" from the dropdown list highlighted. You can also select the icon to the right of the field's name and click "Settings". 00:52: Once you're viewing the field's settings, ensure the "Validation" tab at the top is highlighted. 01:00: Then, select the checkbox next to "Add validation rules". 01:07: Now, we'll start by adding our criteria for the rule. When the following criteria is true, the validation rule will be triggered. Let's begin by selecting the field dropdown to select the Starting Inventory field. Here, you are able to select any field from the same table. 01:28: With the dropdown highlighted, you can select from various operators depending on the field's type. For this example, we want to use the "is blank" operator when users of the app do not submit a value for this field. You can also add multiple criteria by selecting the plus sign icon to the right. 01:50: In the input highlighted, you can input the message that you would like to appear in the Live App or Builder when this rule is triggered. 02:01: If you have a need for multiple validation rules for a field, you can apply additional ones by clicking the "+ Add Rule" button. Once finished adding your rules, select the "Update Field" button. 02:15: Let's test out the validation rule by submitting a form view to add a product and by leaving the Starting Inventory field input blank. Please note that fields included in validation rules must be included in the view to be validated against. Additionally, validation rules only work for form submissions, inline edits, and when manually adding a record in the Builder. 02:42: After submitting the form, you can see the validation message appear here informing the user of what's required before submitting. Users of your app will also see the field that's being validated highlighted in red. 02:56: The guide covered setting validation rules for fields to ensure data accuracy and efficiency. Thank you for watching!

To learn more about using validation rules, see our article here: Using Validation Rules