From 53491c400dd5459e65c771a950025873a4765494 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 5 Feb 2021 10:53:25 +0000 Subject: [PATCH] Adding validation to forms to ensure custom fields can't be the wrong type --- .../src/forms/AttachmentField.svelte | 12 +++++++++--- .../src/forms/BooleanField.svelte | 8 ++++---- .../src/forms/DateTimeField.svelte | 6 +++--- .../src/forms/{SpectrumField.svelte => Field.svelte} | 5 +++++ .../src/forms/LongFormField.svelte | 12 +++++++++--- .../src/forms/OptionsField.svelte | 12 +++++++++--- .../src/forms/RelationshipField.svelte | 7 ++++--- .../standard-components/src/forms/StringField.svelte | 12 ++++++++---- 8 files changed, 51 insertions(+), 23 deletions(-) rename packages/standard-components/src/forms/{SpectrumField.svelte => Field.svelte} (91%) diff --git a/packages/standard-components/src/forms/AttachmentField.svelte b/packages/standard-components/src/forms/AttachmentField.svelte index eebcc65f97..6cf16c109e 100644 --- a/packages/standard-components/src/forms/AttachmentField.svelte +++ b/packages/standard-components/src/forms/AttachmentField.svelte @@ -1,5 +1,5 @@ - + {#if mounted} {/if} - + diff --git a/packages/standard-components/src/forms/BooleanField.svelte b/packages/standard-components/src/forms/BooleanField.svelte index 279542e612..33360474df 100644 --- a/packages/standard-components/src/forms/BooleanField.svelte +++ b/packages/standard-components/src/forms/BooleanField.svelte @@ -1,7 +1,6 @@ - @@ -48,4 +48,4 @@ {/if} - + diff --git a/packages/standard-components/src/forms/DateTimeField.svelte b/packages/standard-components/src/forms/DateTimeField.svelte index 4924e5e383..e58c0ae6bb 100644 --- a/packages/standard-components/src/forms/DateTimeField.svelte +++ b/packages/standard-components/src/forms/DateTimeField.svelte @@ -1,6 +1,6 @@ - + {#if fieldState} {/if} {/if} - +