I'm trying to update my Vue 3 app to Vuelidate v2 and I cannot understand why the v$ object created with useVuelidate doesn't return the $model. It was not a problem in Vuelidate v.0.x. This makes debugging cumbersome.
Example:
<template><input v-model="test"/></template>
<script>
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
export default defineComponent({
setup(props, ctx) {
const test = ref('')
const v$ = useVuelidate({ test: { required } }, { test: test })
return {
v$,
test,
}
}
})
</script>
$v.$model in Vuelidate v.0.7.7: { test: ''} (expected)
v$.$model in Vuelidate v.2.0.3: null
