diff --git a/src/pages/RegisterPage.vue b/src/pages/RegisterPage.vue index b9bec39..069bf27 100644 --- a/src/pages/RegisterPage.vue +++ b/src/pages/RegisterPage.vue @@ -57,6 +57,11 @@ v-model="password" type="password" label="password" + :rules="[ + (val) => + (val != null && val.trim().length >= 8) || + 'Mínimo 8 caracteres', + ]" /> @@ -127,7 +134,9 @@ const comprobarEmail = computed(() => { } return false; }); - +const comprobarConfirmPassword = computed( + () => password.value != confirmpassword.value +); const btnRegisterDisable = () => { if ( username.value == null || @@ -137,7 +146,11 @@ const btnRegisterDisable = () => { nombre.value.length < 3 || email.value == null || email.value.length < 7 || - !comprobarEmail.value + !comprobarEmail.value || + password.value == null || + password.value.trim().length < 8 || + confirmpassword.value == null || + comprobarConfirmPassword.value ) { return true; }