framework
framework copied to clipboard
enum constraint does not validate array items for type: "array"
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
Actually, after rereading the spec for array and enum, there is no hint to the enum constraint being supported in this way in the table schema v2 spec.