OverviewHow to Set Up FAQsRegex Examples

Overview

The Regex Field Validation allow form creators to enforce input rules for different form elements. These rules help maintain data accuracy, prevent errors, and guide users by displaying helpful validation messages.

49-20250310-082253.png

Using Regex Validation for Smart Forms

Setting Up Validation Rules

1. For Single-Line Text Input and Attachment Fields

  1. Navigate to Form Builder:

  2. Enter Regex Pattern:

  3. For text input fields, you can set Minimum characters and Maximum characters limits.

    1. Input Validation Rules:

      • Minimum Characters: No min characters

      • Maximum Characters: No max characters

    2. Default Error Messages:

      • Must be more than or equal to [min] characters.

      • Must be less than or equal to [max] characters.

  4. Define Error Message:


2. Configuring Validation for Multi-Choice and Checkbox Fields

  1. Select Multi-Choice or Checkbox Field:

  2. Set Minimum and Maximum Choices:

  3. Error Message Configuration:


3. Adding Validation for Numeric Fields

  1. Select Numeric Field:

  2. Define Numeric Range:

  3. Error Message Configuration:


FAQs

Q1. What happens if a user input doesn't match the regex pattern?

The field will show the custom error message you defined, prompting the user to correct their input.

Q2. Can I use regex validation for optional fields?

Yes, regex validation applies only when the user fills out the field.

Q3. Are regex patterns case-sensitive?

By default, regex patterns are case-sensitive. To make them case-insensitive, use the i flag (e.g., /pattern/i).


Examles for Regex validation rules


1. Email Address

2. Phone Number (International)

3. Phone Number (US Format)

4. ZIP Code (US)

5. Jira Issue Key Validation (Project-123 format)

6. Invoice Number (Finance Teams)

7. National ID / Social Security Number (US)

8. Tax ID Number (TIN)