Prevent user setup form if passwords dont match

This commit is contained in:
Johannes Zellner
2026-03-18 09:00:34 +01:00
parent 3d55423deb
commit e15cd190b3
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ function validateForm() {
}
async function onSubmit() {
if (!form.value.reportValidity()) return;
if (!form.value.reportValidity() || !isFormValid.value) return;
busy.value = true;
formError.value = {};
+3 -1
View File
@@ -35,7 +35,7 @@ async function onPasswordReset() {
if (res.status === 409) {
error.value.generic = res.body.message;
} else if (res.status === 202) {
mode.value = MODE.NEW_PASSWORD_DONE;
mode.value = MODE.RESET_PASSWORD_DONE;
}
} catch (error) {
error.value.generic = error;
@@ -46,6 +46,8 @@ async function onPasswordReset() {
}
async function onNewPassword() {
if (newPassword.value !== newPasswordRepeat.value) return;
busy.value = true;
error.value = {};