Regex

A regular expression pattern supplied by the Wix user, stored as a string. Use it for a field that validates other input against a pattern, such as a code format the Wix user defines themselves. The value is the source text of a regular expression, for example '^[A-Z]{2}\d{3}$'.

Component

In your component code, import the Regex type from @wix/editor-react-types:

Copy

At runtime it's a plain string:

Copy

Usage

Your code either consumes a value of type Regex or produces one:

Manifest

In your manifest, declare the field with the regex dataType:

Copy

Declaration

Declare a regex field in one of these ways, depending on where the value comes from:

Last updated: 2 November 2026

Did this help?