Knowledge BaseHow to use Autopilot Process SetupHow do I use a regular expression to validate a field?

How do I use a regular expression to validate a field?

What is a Regular Expression?

A Regular Expression is a special text pattern, describing a certain amount of text that can be used ideally for Searching, Text Processing or Data Validation.

An on-line test of a regular expression builder can be found on: http://regexr.com/

Autopilot's Regular Expression syntax

Regular Expression: ^PRO[a-zA-Z]{4}[0-9]{4}

 

  • PRO - This can be any 3 letter prefix you require
  • [a-zA-Z]{4} - This allows for 4 characters
  • [0-9]{4} - This allows for 4 numbers

Altogether, this validation must have 11 characters in the respective order.

Adding custom validation

Adding custom validation

Click on the Validation Icon on the field you want to add the validation to. (As shown above)

Custom Validation

Custom Validation

Enter the custom validation (from above) under 'Enter a Regex pattern to validate against'

Click on Save.