Input Validation in ProcessZen

Input validation helps maintain data integrity by ensuring that user inputs meet specific criteria before proceeding in the workflow.

Adding Validation Rules

To add validation to an input field:

  • Click on the gear icon right next to the input field

Types of Validation

  1. Type Validation

    • Email: Ensures the input is a valid email address
    • Number: Allows only numeric input
    • Date: Ensures the input is a valid date
  2. Length Validation

    • Min length: Sets the minimum number of characters required
    • Max length: Sets the maximum number of characters allowed
  3. Custom Validation

    • Regex: Use custom regular expressions for specific validation needs

Example Validation Rules

  1. Email validation:

    • Type: Email
  2. Phone number validation:

    • Type: Number
    • Min length: 10
    • Max length: 15
  3. Custom Regex validation:

    Regex (Regular Expression) is a powerful tool for pattern matching and text manipulation. It allows you to define complex search patterns for validating or extracting information from strings.

    Here are some common regex patterns:

    Email: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
    Phone (US): '^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$'
    Password (8+ chars, 1 uppercase, 1 lowercase, 1 number): '^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$'
    URL: '^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$'
    

    Creating regex patterns can be complex, but tools like the Regex Generator can help you build and test regex patterns easily.

    Use these patterns in the “Regex” type validation to enforce specific input formats in your workflows.

By implementing proper validation, you can improve data quality and reduce errors in your workflows.