Skip to content

Regex does not match #5593

@madsem

Description

@madsem

I'm on the latest Netlify CMS version, trying to add a simple regex pattern (I have a few others, different ones, that work without issues).

This one though won't match whatever I do.

pattern: [
        '/(@@click_id)/gi',
        "Must be a valid url and at least contain @@click_id",
      ],

The field under validation is a string widget, it is supposed to make sure that the above token is included in a url that is entered in this string widget.

On regexr.com it matches any combination I threw at it, but in the CMS UI it always triggers a validation error (If the token is included or not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions