Heading image
Heading icon Help

Regular expression validation

If you are interested in using Regular Expression Validation (Regex), you can set specific rules for how text is to be presented in the form responses.

This can start off with simple limits, such as the minimum and max lengths of text. This is available in the Standard type.

There are also many more advanced options that you can define when choosing Custom type. 

In this case, you can specify which letters can be used (lowercase, uppercase or both) and what other characters can be allowed within  the text. Starting with spaces, dashes, underscores, etc.

There is also an option to tick the Allow empty checkbox meaning the question can be left unanswered.

If you have more detailed requirements (eg. for your own custom Barcodes), you can also use the Advanced type, which allows you to define your own regular expression. This is only recommended for people with experience in setting and applying regular expressions.

The regular expression can be attached to Text, Barcode and the Comments & Images component.