e-office User Manual
  • Overview
    • Chinese Online User Manual
    • e-Office Training Video
  • Server
    • 1 Preparation
    • 2 Installation
    • 3 License
    • 4 FAQ
    • 5 Service Management Platform
  • Mobile APP
    • 1 Preparation
    • 2 Installation
    • 3 Configuration
  • Quick Start Guideline
  • Design a new workflow
    • 1 New Form - Leave Application
    • 2 New workflow-Leave Application
    • 3 Initialize new leave application
    • 4 Regular Expressions(Regex) in Field validation
  • App Studio - New Application
    • 1 New application - Customer Management
    • 2 Approval flow
    • 3 User Menu
    • 4 All the controls
  • Open API
    • 1 Overview
    • 2 Attachment
    • 3 User Management
  • Customisation
  • Expense
    • My expenses
    • Expense List
    • Enter expense
    • Budget Statistics
    • Setting
      • Budget
      • Permission
        • Expense List
        • Budget Statistics
        • Expense Category
      • Basic Settings
      • Expense category
    • Expense Report
  • Project
    • My project
      • Project Details
    • New project
    • Project Task
    • Report Management
    • Settings
  • CRM
    • CRM Homepage
    • New Customer
    • Details
      • Customer List
        • List Data
        • Data Operation
        • Customer Detail
      • Contact
      • Contact Log
      • Opportunity
      • Sales Record
      • Contracts
      • Customer Pool
        • Pools I Managed
        • Pools I Joined
        • Pool Configuration
    • Suppliers
    • Product
    • More
      • Import/Export
      • Transfer
      • Merge
      • Recycle Bin
      • Request to access
      • Permission Approval
    • Customer Report
    • Settings
      • Field Settings
      • Homepage Configuration
      • Pool Configuration
      • Permission Setting
      • Related Business Setting
  • Assets
    • New asset
    • Application for use ~ WIP
    • Application for approval
    • Changes
    • Maintenance
    • Asset inventory ~ WIP
    • Return of assets ~ WIP
    • Analysis ~ WIP
    • Settings ~ WIP
  • Leave
    • My Leave
    • Leave List
    • Leave Type
    • Leave Setting
  • Attendance ~ WIP
Powered by GitBook
On this page
  • 1 Email
  • 2 URL
  • 3 Numeric
  • 4. Date
  • 4.1 YYYY-MM-DD
  • 4.2 DD-MM-YYYY or DD.MM.YYYY or DD/MM/YYYY
  • 4.3 DD-mmm-YYYY or DD.mmm.YYYY or DD/mmm/YYYY
  • 5 Phone number
  • 6 Postal code
  1. Design a new workflow

4 Regular Expressions(Regex) in Field validation

Last updated 1 year ago

During form design, we need to think about valid the user input to ensure the data quality, below is the place to validate the data format.

1 Email

^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$

2 URL

^(https?:\/\/)?([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5})(:[0-9]{1,5})?(\/.*)?$

3 Numeric

^\d+(?:\.\d+)?$

4. Date

4.1 YYYY-MM-DD

^(?:19|20)\d\d-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$

4.2 DD-MM-YYYY or DD.MM.YYYY or DD/MM/YYYY

 ^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$

4.3 DD-mmm-YYYY or DD.mmm.YYYY or DD/mmm/YYYY

^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]|(?:Jan|Mar|May|Jul|Aug|Oct|Dec)))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2]|(?:Jan|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)(?:0?2|(?:Feb))\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9]|(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep))|(?:1[0-2]|(?:Oct|Nov|Dec)))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$

5 Phone number

^\+?[1-9]\d{1,14}$

6 Postal code

There is no single regular express could handle all the postal code format around the word, but here is the list for each country(158 regex's in total)

https://stackoverflow.com/questions/578406/what-is-the-ultimate-postal-code-and-zip-regex/7185241#7185241