Vuejs - Add dynamic required in fields

I started studying vuejs and started a new project using f7 + vue.

A doubt arose.
I’m doing an input validation via HTML, but I need to check before saving if the field is really validated and then show the error message …
Validation is working through HTML, but how do I perform validation via JS (VUE), in other words, force validation.

My input:

						v-if="field.field == 'input'"
 						@input="formData[index] = $"
				        :validate="field.validation && field.validation.required ? true : false"
				        :required="field.validation && field.validation.required ? true : false"
				    <!--  -->

My method in js:
onSubmit: function(event) {
const self = this;

Use F7’s APIs to trigger validation for form or input programmatically


Both of them will return true/false (in latest F7 version)