framework icon indicating copy to clipboard operation
framework copied to clipboard

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

Open pierrecamilleri opened this issue 2 months ago • 1 comments

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

pierrecamilleri avatar Dec 11 '24 17:12 pierrecamilleri