1
0
Fork 0
mirror of synced 2024-07-07 07:15:43 +12:00

Merge pull request #6109 from Budibase/bug/sev2/automation-trigger-save-multiselect

Automation validation - convert array string to array type
This commit is contained in:
melohagan 2022-06-01 13:23:51 +01:00 committed by GitHub
commit 81ad54acaa

View file

@ -64,6 +64,9 @@ exports.validate = async ({ tableId, row, table }) => {
// Validate.js doesn't seem to handle array
if (type === FieldTypes.ARRAY && row[fieldName]) {
if (row[fieldName].length) {
if (!Array.isArray(row[fieldName])) {
row[fieldName] = row[fieldName].split(",")
}
row[fieldName].map(val => {
if (
!constraints.inclusion.includes(val) &&