diff --git a/packages/client/src/components/app/blocks/CardsBlock.svelte b/packages/client/src/components/app/blocks/CardsBlock.svelte index 3e48247f92..e0985a8979 100644 --- a/packages/client/src/components/app/blocks/CardsBlock.svelte +++ b/packages/client/src/components/app/blocks/CardsBlock.svelte @@ -88,7 +88,7 @@ {#if title || enrichedSearchColumns?.length || showTitleButton} diff --git a/packages/client/src/components/app/forms/InnerForm.svelte b/packages/client/src/components/app/forms/InnerForm.svelte index 9d0db43bf4..55c9c938c3 100644 --- a/packages/client/src/components/app/forms/InnerForm.svelte +++ b/packages/client/src/components/app/forms/InnerForm.svelte @@ -11,7 +11,7 @@ export let size export let schema export let table - export let disableValidation = false + export let disableSchemaValidation = false export let editAutoColumns = false // We export this store so that when we remount the inner form we can still @@ -156,17 +156,16 @@ if (!field) { return } - // Create validation function based on field schema - const schemaConstraints = schema?.[field]?.constraints - const validator = disableValidation + const schemaConstraints = disableSchemaValidation ? null - : createValidatorFromConstraints( - schemaConstraints, - validationRules, - field, - table - ) + : schema?.[field]?.constraints + const validator = createValidatorFromConstraints( + schemaConstraints, + validationRules, + field, + table + ) // Sanitise the default value to ensure it doesn't contain invalid data defaultValue = sanitiseValue(defaultValue, schema?.[field], type) @@ -332,15 +331,15 @@ const { value, error } = fieldState // Create new validator - const schemaConstraints = schema?.[field]?.constraints - const validator = disableValidation + const schemaConstraints = disableSchemaValidation ? null - : createValidatorFromConstraints( - schemaConstraints, - validationRules, - field, - table - ) + : schema?.[field]?.constraints + const validator = createValidatorFromConstraints( + schemaConstraints, + validationRules, + field, + table + ) // Update validator fieldInfo.update(state => {