The Regex Pattern feature lets you apply a custom regular expression validation to any Text field. It allows advanced control over what users can input, such as enforcing specific formats or disallowing certain characters. This feature only applies to fields of type Text.
Settings
To apply a regex pattern, add it to a Text field in your Bricks Form by enabling the Regex Pattern option.
Regex Pattern: Enter the regular expression that the field input must match (e.g.,
^[a-z0-9_-]{3,16}$
). This pattern is checked in the browser when the user clicks the submit button before submitting the form.