feat: add password validation and error messages, enhance CityCard styling, and update localization for email and password prompts

This commit is contained in:
Sean Morley
2025-01-09 18:25:51 -05:00
parent 22790ae7c0
commit 013a2cc751
12 changed files with 154 additions and 24 deletions

View File

@@ -194,10 +194,15 @@ export const actions: Actions = {
if (password1 !== password2) {
return fail(400, { message: 'settings.password_does_not_match' });
}
if (!current_password) {
current_password = null;
}
if (password1 && password1?.length < 6) {
return fail(400, { message: 'settings.password_too_short' });
}
let csrfToken = await fetchCSRFToken();
if (current_password) {