diff --git a/src/components/ui/ChangePasswordForm.vue b/src/components/ui/ChangePasswordForm.vue index 7f5414ef..fb2c595d 100644 --- a/src/components/ui/ChangePasswordForm.vue +++ b/src/components/ui/ChangePasswordForm.vue @@ -27,6 +27,10 @@ const formData = ref({ }); const changePassword = async () => { + if (!formData.value.newPassword || !repeatPassword.value) { + notify(t('passwordEmpty'), 'negative'); + throw new Error('Password empty'); + } if (formData.value.newPassword !== repeatPassword.value) { notify(t('passwordsDoNotMatch'), 'negative'); throw new Error('Passwords do not match'); @@ -143,6 +147,7 @@ en-US: digits: '{nDigits} digits' symbols: '{nPunct} symbols. Ej: $%&.' passwordsDoNotMatch: Passwords do not match + passwordEmpty: Password empty es-ES: changePassword: Cambiar contraseña newPassword: Nueva contraseña @@ -157,6 +162,7 @@ es-ES: digits: '{nDigits} dígitos' symbols: '{nPunct} símbolos. Ej: $%&.' passwordsDoNotMatch: ¡Las contraseñas no coinciden! + passwordEmpty: Contraseña vacía ca-ES: changePassword: Canviar contrasenya newPassword: Nova contrasenya @@ -171,6 +177,7 @@ ca-ES: digits: '{nDigits} dígits' symbols: '{nPunct} símbols. Ej: $%&.' passwordsDoNotMatch: Les contrasenyes no coincideixen! + passwordEmpty: Contrasenya buida fr-FR: changePassword: Changer le mot de passe newPassword: Nouveau mot de passe @@ -185,6 +192,7 @@ fr-FR: digits: '{nDigits} chiffres' symbols: '{nPunct} symboles. Ej: $%&.' passwordsDoNotMatch: Les mots de passe ne correspondent pas! + passwordEmpty: Mots de passe vides pt-PT: changePassword: Alterar palavra-passe newPassword: Nova palavra-passe @@ -199,4 +207,5 @@ pt-PT: digits: '{nDigits} dígitos' symbols: '{nPunct} símbolos. Ej: $%&.' passwordsDoNotMatch: As palavras-passe não coincidem! + passwordEmpty: Palavra-passe vazia