0👍
could be any of this.
v-on:submit.prevent="onSubmit"
v-on:click.prevent="select(kudo.id)"
I don’t know where are you submitting but check this events if you want to know more.
- [Vuejs]-Dynamic select box data binding on vuejs
- [Vuejs]-Npm install package throws error The operation was rejected by your operating system
0👍
In your methods, add a form verification method:
checkForm: function (e) {
if (this.name && this.age) { //change these to your required field names
this.addKudoPost(this.authuser);
}
this.errors = [];
if (!this.name) { //change these to your required field names
this.errors.push('Name required.');
}
if (!this.age) { //change these to your required field names
this.errors.push('Age required.');
}
e.preventDefault();
}
Source:stackexchange.com