I created v-form
like this
...
If you use vue-class-component
with vue-property-decorator
you can do it like this:
Define in a types.ts
a new Type with the vuetify form functions:
export type VForm = Vue & {
validate: () => boolean;
resetValidation: () => boolean;
reset: () => void;
};
Then import in your component:
import { VForm } from "types";
import { Component, Ref} from "vue-property-decorator";
Use @Ref in your component to define the form:
export default class YourComponent extends Vue {
@Ref("form") readonly form!: VForm;
}
so in your methods you can use it like this:
this.form.validate();
this.form.resetValidation();
this.form.reset();