username sin caracteres extraños
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
(val) =>
|
||||
(val != null && val.length >= 3) || 'Mínimo 3 caracteres',
|
||||
(val) => comprobarUsername || 'Ya existe en la BD',
|
||||
(val) => /^[A-Z0-9]+$/i.test(val) || 'Sólo letras o números'
|
||||
]" />
|
||||
<q-input square filled clearable v-model="nombre" type="text" label="nombre completo" :rules="[
|
||||
(val) =>
|
||||
@@ -93,6 +94,7 @@ const btnRegisterDisable = () => {
|
||||
username.value == null ||
|
||||
username.value.length < 3 ||
|
||||
!comprobarUsername.value ||
|
||||
!/^[A-Z0-9]+$/i.test(username.value) ||
|
||||
nombre.value == null ||
|
||||
nombre.value.length < 3 ||
|
||||
email.value == null ||
|
||||
@@ -117,14 +119,6 @@ const registrar = () => {
|
||||
'passwordConfirm': confirmpassword.value,
|
||||
'name': nombre.value
|
||||
}
|
||||
/* const data = {
|
||||
"username": "test_username",
|
||||
"email": "test@example.com",
|
||||
"emailVisibility": true,
|
||||
"password": "12345678",
|
||||
"passwordConfirm": "12345678",
|
||||
"name": "test"
|
||||
}; */
|
||||
listaStore.register(data)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user