Skip to main content

How to use regular expressions for conditions?

I want to validate the format of an ID number entered by a user.

Updated over 2 weeks ago

The regular expression (RegEx) provides a wide range of possibilities and flexibility in setting up conditions for various features such as:

  • Conditional Field

  • Field Validation

  • Filters

  • Login conditions

  • Form submission conditions

RegEx can be quite confusing, but ChatGPT is great at generating them based on a description of the desired limitations!

E.g. "Give me a RegEx that limits my field to only lowercase characters and numbers, 4 to 7 characters long. Also allow a single dash."

For instance, you may use RegEx to validate if an ID number follows a specific format like this example.

Example: Zip Code Format Validation

Here's an example of how to validate Zip codes:

You would use the pattern ^\d{5}(-\d{4})?$ and the result would look like this:

Limitations

RegEx is not supported for the following field types:

  • Multi-select

  • Date

  • Duration

  • Checkbox

  • Number

  • Currency

  • Percent

  • Linked Records

  • Lookup

  • Rating

Did this answer your question?