diff --git a/plugins/login-resources/src/components/Form.svelte b/plugins/login-resources/src/components/Form.svelte index c30b456bec..0c3b1688f6 100644 --- a/plugins/login-resources/src/components/Form.svelte +++ b/plugins/login-resources/src/components/Form.svelte @@ -21,6 +21,7 @@ import { translate } from '@hcengineering/platform' import login from '../plugin' + import { onMount } from 'svelte' interface Field { id?: string @@ -52,8 +53,10 @@ export let secondaryButtonAction: (() => void) | undefined = undefined export let bottomActions: BottomAction[] = [] export let object: any + export let ignoreInitialValidation: boolean = false async function validate () { + if (ignoreInitialValidation) return for (const field of fields) { const v = object[field.name] const f = field @@ -99,6 +102,7 @@ inAction = false }) } + onMount(() => (ignoreInitialValidation = false)) function trim (field: string): void { object[field] = (object[field] as string).trim() diff --git a/plugins/login-resources/src/components/LoginForm.svelte b/plugins/login-resources/src/components/LoginForm.svelte index dccdb46eee..7a2d9e88b3 100644 --- a/plugins/login-resources/src/components/LoginForm.svelte +++ b/plugins/login-resources/src/components/LoginForm.svelte @@ -108,4 +108,12 @@ } -
+