Change password form fields validation
gitea/hedera-web/pipeline/pr-4922-vueMigration This commit looks good Details

This commit is contained in:
William Buezas 2024-07-26 08:54:11 -03:00
parent 7f831ae3a5
commit 06cd9b01d3
1 changed files with 9 additions and 0 deletions

View File

@ -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
</i18n>