Validate by field

This commit is contained in:
Adria Navarro 2025-01-27 11:48:00 +01:00
parent 92606c6129
commit f666b35bd1
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ const validationKeyByType: Record<UIDatasourceType, string | null> = {
query: "_id",
custom: null,
link: "rowId",
field: "label",
}
export const screenComponentErrors = derived(
@ -72,6 +73,7 @@ export const screenComponentErrors = derived(
"rowId",
bindings.extractRelationships(componentBindings)
),
...reduceBy("label", bindings.extractFields(componentBindings)),
}
const resourceId = componentSettings[validationKey]

View File

@ -5,3 +5,4 @@ export type UIDatasourceType =
| "query"
| "custom"
| "link"
| "field"