Skip to content

Commit 2832436

Browse files
calm329andr317c
andcommitted
Fix login validation messages not showing on submit (#21306)
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com> (cherry picked from commit 4df4ee9)
1 parent 462d63b commit 2832436

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Umbraco.Web.UI.Login/src/auth.element.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ const createFormLayoutItem = (label: HTMLLabelElement, input: HTMLInputElement,
112112
// Bind validation
113113
input.oninput = () => validateInput(input, validationMessage, localizationKey);
114114
input.onblur = () => validateInput(input, validationMessage, localizationKey);
115+
input.oninvalid = () => validateInput(input, validationMessage, localizationKey);
115116

116117
return formLayoutItem;
117118
};
@@ -139,6 +140,7 @@ const createFormLayoutPasswordItem = (
139140
// Bind validation
140141
input.oninput = () => validateInput(input, validationMessage, requiredMessageKey);
141142
input.onblur = () => validateInput(input, validationMessage, requiredMessageKey);
143+
input.oninvalid = () => validateInput(input, validationMessage, requiredMessageKey);
142144

143145
return formLayoutItem;
144146
};

0 commit comments

Comments
 (0)