Custom message

This commit is contained in:
Adria Navarro 2024-03-14 14:20:51 +01:00
parent fdf83fd65d
commit 329fc53ac8
1 changed files with 5 additions and 4 deletions

View File

@ -170,10 +170,6 @@
relationshipPart1 = part1 relationshipPart1 = part1
relationshipPart2 = part2 relationshipPart2 = part2
} }
} else if (editableColumn.type === FieldType.ATTACHMENT) {
editableColumn.constraints ??= { length: {} }
editableColumn.constraints.length ??= {}
editableColumn.constraints.length.maximum = 1
} }
} }
@ -508,6 +504,8 @@
onMount(() => { onMount(() => {
mounted = true mounted = true
}) })
$: console.log({ editableColumn })
</script> </script>
<Layout noPadding gap="S"> <Layout noPadding gap="S">
@ -722,8 +720,11 @@
editableColumn.constraints ??= { length: {} } editableColumn.constraints ??= { length: {} }
editableColumn.constraints.length ??= {} editableColumn.constraints.length ??= {}
editableColumn.constraints.length.maximum = 1 editableColumn.constraints.length.maximum = 1
editableColumn.constraints.length.message =
"cannot contain multiple files"
} else { } else {
delete editableColumn.constraints?.length?.maximum delete editableColumn.constraints?.length?.maximum
delete editableColumn.constraints?.length?.message
} }
}} }}
thin thin