Skip to content

Migration error with negative lookahead in regexp validation #1285

@dt-rtlayzell

Description

version: 4.19.1

Adding a validation with a regexp that contains a negative lookahead appears to cause an error during migration, but adding the same pattern directly in Contentful UI works perfectly fine.

{
  "status": "Unprocessable Entity",
  "message": "Validation error",
  "details": {
    "errors": [
      {
        "name": "invalid",
        "details": "The property \"regexp\" is not valid",
        "path": [
          "fields",
          10,
          "validations",
          0,
          "regexp"
        ],
        "value": {
          "pattern": "^(?!hello\\s)world$",
          "flags": "i"
        }
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions