Encountering an issue with validating a v-form from Vuetify. When attempting to validate each tab within a function, the following error message is received:
Error in v-on handler: "TypeError: this.$refs.formTest1.validate is not a function"
The validation function being used is as follows:
validateTab() {
return (
this.$refs["formTest1"] as Vue & {
validate: () => boolean;
}
).validate();
},
There is also a loop that iterates through every test as shown below:
<v-tab-item
v-for="test in system.test"
:key="test.key"
>
The code snippet for creating v-forms for each iteration is included here:
<v-form
:ref="'form' + test.id"
v-show="test.schema"
v-model="validationMap[test.id]"
>
<v-jsf
// some dialog
/>
</v-form>
The validationMap structure consists of IDs as strings paired with booleans representing the validations.
It appears unable to access the validate() function of v-form and the attempts to resolve the issue with indexing have led to error messages.
Further details can be found in a related thread: linked here.
Seeking assistance and any insights on resolving this issue. Thank you!