Skip to content

enum constraint does not validate array items for type: "array" #1718

Open
@pierrecamilleri

Description

@pierrecamilleri

With a schema specifying an enum constraint on a field of type array, the enum constraints does not validate the array items but the whole array value.

Expected behavior

Array items should be validated against the enum constraint.

Data to reproduce

schema.json

{
  "fields": [
    {
      "name": "foo",
      "type": "array",
      "constraints": {
        "enum": ["A", "B"]
      }
    }
  ]
}

data.csv

foo
"[""1"",""2""]"
"[""A"",""B""]"
frictionless --version
 # 5.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions