Validation Rules

Validation rules ensure data accuracy by defining conditions that must be met before information can be submitted or saved.

What You'll Learn

This guide explains how validation rules work and how they help maintain data quality in your application. You'll understand when validation rules apply and discover common scenarios where they're particularly valuable.

What are Validation Rules?

Validation rules are customizable criteria that check if data meets specific conditions before it can be saved. These rules apply when adding or editing records in both the Builder and Live App, displaying error messages when the entered information doesn't satisfy your requirements.

Here are some examples of how Validation Rules can be used:

  • Required Fields: Users must complete mandatory fields before submitting a form. For example, contact information forms can require email addresses and phone numbers.

  • Numeric Constraints: Entry fields can restrict values to specific ranges, such as quantities between 1-100 or prices above $0.

  • Date Logic: Forms can enforce chronological integrity, ensuring end dates occur after start dates or preventing future dates for birth certificates.

  • Pattern Matching: Product SKUs can be validated against specific formats using regular expressions.

When editing a record in the Builder or Live App, or submitting a form, and a field does not meet a validation rule, users see clear error messages directing them to correct the specific issues before they can save their changes.

Set up Validation Rules in the DataTable

Set up Validation Rules in the DataTable


How Validation Rules Work

When a validation rule is applied to a field:

  1. The rule checks the entered data against defined conditions
  2. If conditions are met, the data is accepted
  3. If conditions are not met:
    • The field is highlighted
    • A custom error message is displayed
    • The form cannot be submitted until the issue is fixed

Validation rules function during:

  • Form submissions in the Live App
  • Manual record creation in the Builder
  • Editing records in the Live App

📘

Validation Rules do not apply when importing data


A field in this Live App form did not meet validation requirements

A field in this Live App form did not meet validation requirements

When to Use Validation Rules

Validation rules are particularly valuable when:

Ensuring Data Format Consistency

  • Standardizing phone number formats
  • Requiring specific date formats
  • Enforcing consistent product codes or IDs

Implementing Business Rules

  • Setting minimum order quantities
  • Enforcing credit limit restrictions
  • Requiring approvals for values above thresholds

Enhancing User Data Quality

  • Preventing typos in email addresses
  • Ensuring strong passwords
  • Limiting file uploads to appropriate sizes

Meeting Compliance Requirements

  • Ensuring required legal information is provided
  • Verifying age requirements
  • Confirming acceptance of terms and conditions

Understanding what validation rules can do is the first step. To learn how to create and manage them, see the Adding and Managing Validation Rules guide.