userguides
  • Welcome
  • Contact Us
  • Getting Started
    • Quickstart
    • Inside ViewZen
  • ViewZen Accounts
    • Overview
    • Account Owner
    • Home Page
    • Member Profile
      • My Account
      • My Organization
      • Security
      • Permissions
    • Roles and Permissions
      • Standard Roles
      • Custom Roles
    • User Management
    • User Groups
    • Multi factor Authentication
    • Context based Permissions
    • API Keys
  • Appverse
    • Overview
    • Home Page
    • Apps
      • Create an App
        • Folders
          • Create
          • Edit
          • Delete
          • View Contents
        • Roles
        • Forms
          • Create
            • Get Familiar
              • General Properties
              • Hint
              • Appearance
              • Validations
                • Examples
              • List of Values
              • Scope
                • Examples
              • Search Settings
              • Security
              • Expressions
              • Appverse Expressions
                • Examples
              • Choices
              • Instance Name
              • Download Form
              • Import Form
            • Best Practices
            • Create with Form Builder
            • Create with GenAI
            • Create with ODK compatible xls
          • Edit
          • Delete
          • Deploy / Undeploy
          • Settings
            • General Settings
            • Data Display
            • Appearance
            • Languages
            • Auto Numbering
            • Lookup
            • Child Forms
            • Report Template
            • Validations
            • Data Formatting Rules
            • Record Access
            • Quick Filters
          • Allocation
            • Get Familiar
              • General Properties
              • View Permissions
          • Quick Configuration
          • Events and Actions
            • Save to DB
            • Lock Record
            • Update Status
            • Create / Update Record
            • Send Notifications
            • Custom Scripts
          • Conditions in Appverse
          • Advanced Search
          • Data
            • Card Layout
            • Grid Layout
            • Master Detail Layout
          • Dashboards
            • Publish Dataset
            • Dashboard
        • Dashboards
          • Link
      • Edit an App
      • Delete an App
      • List of all Apps
      • Publish an App
      • Export & Import an App
    • User Allocation
    • Library
      • Custom Scripts
      • Custom Queries
      • Report Templates
    • Departments
    • Settings
  • ViewZen Analytics
    • Overview
    • Landing Page
    • Dashboard
      • List of Dashboards
      • Create a Dashboard
        • Get Started
        • Datasets
        • Sheets
        • Version Control
        • Toolbar
          • Place Components
            • Properties
              • Data Properties
                • Data Fields
                • Inbuilt Aggregation Functions
                • Dimensions
                • Measures
                • X-axis and Y-axis
                • Column
                • Data Series
              • Format Properties
                • Title / Sub Title / Label
                • Appearance
                • Legend
                • Viewer Settings
                • General Settings
                • Axis Settings
                • Axis Label Settings
                • Axis Title Settings
                • Label Formatting
                • Sorting
                • Color Formatting
                • Column Formatting
                • Stacked Header
                • Footer
                • Actions and Events
                • Chart Settings
                • Grid Settings
                • Data Series Formatting
                  • Value Series
                  • Column Series
                  • Stacked Column Series
                  • Radar Column Series
                  • Waterfall Series
                  • Line Series
                  • Bubble Series
                  • Pie Series
                  • Donut Series
                  • Funnel Series
                  • Clustered Area Series
              • Tooltip Properties
                • Properties
            • Visuals
              • Cards
              • Charts
              • Grid
              • Textbox
              • Filter
              • Image
              • Zone
            • Visuals Marketplace
          • Edit Components
          • Delete Components
        • Filters
          • Fixed Filters
            • Create Filter
              • Filter Conditional Statements
            • Edit Filter
            • Delete Filter
          • Interactive Filters
            • Create Filter
            • Edit Filter
            • Delete Filter
      • Edit a Dashboard
      • Share a Dashboard
      • Delete a Dashboard
      • View a Dashboard
      • Use Dashboard for Presentations
Powered by GitBook
On this page
  1. Appverse
  2. Apps
  3. Create an App
  4. Forms
  5. Create
  6. Get Familiar
  7. Validations

Examples

Some example of validation expressions are as under

Example
Field in Form
Validation Expresssion

Validate that a phone number is 10 digits

phone_no

regex(., '^\d{10}$')

End date is after the start date

start_date, end_date

. > {start_date}

Input number is between 10 and 100

input_number

. >= 10 and .<= 100

Check that the input number is even

input_number

. mod 2 = 0

Email address is valid

email_address

regex(., '^[\w.%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,}$')

Input Date is within the last 15 days

input_date

. >= today() - 15 and . <= today()

Ensure that at least one of the fields is filled

phone_no, email_address

(${phone_no} != '' or ${email_address} != '')

[This condition should be put in the note field and the note field should be made mandatory]

Time is within 10 AM to 6 PM

input_time

. >= '10:00' and . <= '18:00'

Validate GPS coordinates within a specific area

location

.[0] > -2 and .[0] < 2 and .[1] > 34 and .[1] < 38

[checks that latitude is between -2 and 2, and longitude is between 34 and 38]

Check if name contains only alphabets

name

regex(., '^[A-Za-z ]+$')

Note - . (dot) refers to the current field that needs to be validated

PreviousValidationsNextList of Values

Last updated 3 months ago