From bdcc3329b71447aa09513ba73c1d7a94d86fe4dd Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 8 Jun 2022 12:27:01 +0200 Subject: [PATCH] Add trim to email validation --- UI/Input/ValidatedTextField.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/UI/Input/ValidatedTextField.ts b/UI/Input/ValidatedTextField.ts index 15fe25b7eb..9976ca3887 100644 --- a/UI/Input/ValidatedTextField.ts +++ b/UI/Input/ValidatedTextField.ts @@ -733,6 +733,7 @@ class EmailTextField extends TextFieldDef { if (str === undefined) { return false } + str = str.trim() if (str.startsWith("mailto:")) { str = str.substring("mailto:".length) } @@ -743,6 +744,7 @@ class EmailTextField extends TextFieldDef { if (str === undefined) { return undefined } + str = str.trim() if (str.startsWith("mailto:")) { str = str.substring("mailto:".length) }