country validation #33k7mh5

This commit is contained in:
Sevan Nerse
2022-07-01 00:04:04 +03:00
parent 2001aaad78
commit 76dea1b1da
3 changed files with 29 additions and 0 deletions

View File

@ -30,5 +30,22 @@ const app = new Vue({
form: new Form('company'),
bulk_action: new BulkAction('companies')
}
},
methods: {
// Form Submit
onSubmit() {
this.form.loading = true;
if (this.form.country === "") {
this.form.errors.set('country', [country_validation_required_message]);
this.form.loading = false;
return;
}
this.form.submit();
},
}
});