Open Dylan190774 opened 2 years ago
Found it out myself, sorry for asking. I misunderstood this plugin for thinking it was some kind of Vuelidate-wrapper, but it simply defines the Vuelidate-rules, to make it easy to use them with the internal Quasar rules, which is very handy.
By wrapping the input fields in a q-form
with a ref, you can do:
<q-form ref="myform">
<!-- all inputs -->
</q-form>
const myform = ref(null)
myform.value.resetValidation();
Hi, I like this plugin very much. However, I can't find out how to reset the entire form (or all inputs with rules), after using it the first time (or after I cancel the form). All my inputs on the form have as v-model a sub-property of a
formdata
-object which is acomputed
, based on a Object-prop in Vue3 Composition API :the form inputs look like this :
In the Vuelidate docs I see something like
this.$v.$reset()
but with your plugin I can't find such an object anywhere.Hope you can help!