hello i have used it with nuxt but it has one issue
atta1234 opened this issue · comments
i m using vuetify and nuxt it display the errors well but when i write something the error is still thire until i submit the form
that keydown event not working i think any solution?
`
Log In
<v-form @submit.prevent="register"@keydown="form.onKeydown($event)">
<v-text-field label="Name" name="name" v-model="form.name"/>
<has-error :form="form" field="name"></has-error>
<v-text-field label="Email" v-model="form.email"/>
<has-error :form="form" field="email"></has-error>
<v-text-field label="Password" v-model="form.password"/>
<has-error :form="form" field="password"></has-error>
<v-text-field label="Password" v-model="form.password_confirmation"/>
<v-btn type="submit">Log In</v-btn>
</v-form>
</v-card-text>
</v-card>
export default {
data() {
return {
form: new Form({
name: '',
email: '',
password: '',
password_confirmation: '',
})
}
},
methods: {
register(){
this.form.post('http://localhost/laravel-vue-spa-laravel-6.1/public/api/auth/register')
.then(({ data }) => {
this.$router.push('/')
})
},
}
}
</script>
Hi @atta1234 <v-form>
does not contain @keydown
Use <form>
instead of <v-form>
or use @keydown
on <v-text-field>
thank you sir