-
Notifications
You must be signed in to change notification settings - Fork 645
Closed
Milestone
Description
$validators do not seem to work for arrays.
Sample schema:
{
"type": "object",
"properties": {
"arr": {
"title": "Array",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
}
}
}
}
}
}
Sample form:
[
{
"key": "arr",
"validationMessage": {
"atLeastTwo": "Please add at least two options"
}
$validators: {
atLeastTwo: function (value) {
debugger
return value?.length > 1
}
}
}
]
Is there some workaround for this?