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:
commit
81ad54acaa
|
@ -64,6 +64,9 @@ exports.validate = async ({ tableId, row, table }) => {
|
||||||
// Validate.js doesn't seem to handle array
|
// Validate.js doesn't seem to handle array
|
||||||
if (type === FieldTypes.ARRAY && row[fieldName]) {
|
if (type === FieldTypes.ARRAY && row[fieldName]) {
|
||||||
if (row[fieldName].length) {
|
if (row[fieldName].length) {
|
||||||
|
if (!Array.isArray(row[fieldName])) {
|
||||||
|
row[fieldName] = row[fieldName].split(",")
|
||||||
|
}
|
||||||
row[fieldName].map(val => {
|
row[fieldName].map(val => {
|
||||||
if (
|
if (
|
||||||
!constraints.inclusion.includes(val) &&
|
!constraints.inclusion.includes(val) &&
|
||||||
|
|
Loading…
Reference in New Issue