If I am using an array schema type with the uniqueItems schema set on it I can only ever receive one unique error at a time. For example if I add the same entry three times in a row into the array only the last two entries will appear as duplicate (items 2,3), but items (1,2) error disappears from the error array when the items (2,3) error appears.
First errors array
[
{
dataPath: "options"
keyword: "uniqueItems"
message: "should NOT have duplicate items (items ## 1 and 2 are identical)"
params: {i: 2, j: 1}
parentSchema: {items: {…}, minItems: 1, type: "array", uniqueItems: true}
schema: true
schemaPath: "#/properties/options/uniqueItems"
}
]
Second errors array, missing the first error even though it hasn't been resolved.
[
{
dataPath: "options"
keyword: "uniqueItems"
message: "should NOT have duplicate items (items ## 2 and 3 are identical)"
params: {i: 3, j: 2}
parentSchema: {items: {…}, minItems: 1, type: "array", uniqueItems: true}
schema: true
schemaPath: "#/properties/options/uniqueItems"
}
]
Is this intended functionality?