fix: display friendly error message for password validation on signup (#5563)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Brian FrommandClaude authored and GitHub committed 2025-11-19 17:42:50 +01:00
1 parent a3b5584505
commit 6d5aa355e4
3 files changed
+13 -1

No files matched your search

+7
View File
@@ -112,6 +112,13 @@ const submit = async (event: Event) => {
error.value = t("login.usernameTaken");
} else if (e.status === 403) {
error.value = t("login.wrongCredentials");
} else if (e.status === 400) {
const match = e.message.match(/minimum length is (\d+)/);
if (match) {
error.value = t("login.passwordTooShort", { min: match[1] });
} else {
error.value = e.message;
}
} else {
$showError(e);
}