Validate json arrays

This commit is contained in:
Adria Navarro 2025-01-27 12:16:07 +01:00
parent 1557b02682
commit f9dadf83a2
2 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ const validationKeyByType: Record<UIDatasourceType, string | null> = {
custom: null,
link: "rowId",
field: "value",
jsonarray: "value",
}
export const screenComponentErrors = derived(
@ -74,6 +75,10 @@ export const screenComponentErrors = derived(
bindings.extractRelationships(componentBindings)
),
...reduceBy("value", bindings.extractFields(componentBindings)),
...reduceBy(
"value",
bindings.extractJSONArrayFields(componentBindings)
),
}
const resourceId = componentSettings[validationKey]

View File

@ -6,3 +6,4 @@ export type UIDatasourceType =
| "custom"
| "link"
| "field"
| "jsonarray"