Do not validate if multi-select options length is 0
This commit is contained in:
parent
50729710c5
commit
85ff73cb26
|
@ -65,7 +65,10 @@ exports.validate = async ({ tableId, row, table }) => {
|
|||
if (type === FieldTypes.ARRAY && row[fieldName]) {
|
||||
if (row[fieldName].length) {
|
||||
row[fieldName].map(val => {
|
||||
if (!constraints.inclusion.includes(val)) {
|
||||
if (
|
||||
!constraints.inclusion.includes(val) &&
|
||||
constraints.inclusion.length !== 0
|
||||
) {
|
||||
errors[fieldName] = "Field not in list"
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue