Set a validation rule using the rule builder

Validation rules restrict what a user is allowed to input in a field. If a user’s input doesn’t violates the validation rule, the user won’t be allowed to save the record.

In this tutorial, we will add a simple validation rule to form collecting data about primary school students, specifically to the age field.

Step 1: Add a new form

  1. From the database page, click “Add Form”
  2. Enter “Student registration” as the Form Name

Add the name field

  1. Click “Add a field”
  2. From the list of field types, click “Text”
  3. Enter “Name” as the label
  4. Check “Key” in settings

Add the age field

  1. Move your cursor below the first field and click the “+” button
  2. From the list of field types, click “Quantity”
  3. Enter “Age” as the label
  4. Check “Required” in settings
  5. Check “Set validation rules”
  1. Scroll down to the “Validation Rules” section
  2. Where it says “Count as valid if”, change “Any” to “All”
  3. In the first row of the rules editor, change the predicate from “is” to “is greater than”, and set the value to “3”
  4. Click the “Add” button to add another row in the rules editor
  5. In the second row, change the predicate from “is” to “is less than” and set the value to “12”
  1. Click “Done”

Click “Save” to save the form

Step 2: Test the data entry form

  1. From the Table View, click “Add Record”
  2. In the name field, enter “Oliver Twist”
  3. In the age field, enter “20”
  4. Click “Save record”

Because “20” violates the validation rule, ActivityInfo will not allow you to save the record. An error message will be displayed below the field:

Change the value to 6 and you then you can save the record.

Next item
Set up an approval workflow