From 0add3fb306114f85545bf11791248795cb49f8f1 Mon Sep 17 00:00:00 2001 From: clonbg Date: Mon, 27 Feb 2023 15:58:19 +0100 Subject: [PATCH] falta que registre, email y tal --- src/pages/RegisterPage.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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; }