logaretm / vee-validate

✅ Painless Vue forms
https://vee-validate.logaretm.com/v4
MIT License
10.81k stars 1.26k forks source link

`meta.touched` not changing with useForm and zod #4670

Open AntonioDell opened 8 months ago

AntonioDell commented 8 months ago

What happened?

The meta.touched property isn't changing when using composable setup with a zod typed schema. It is always false.

Maybe there is additional setup required to make it work with composition api?

Reproduction steps

See reproduction repo: https://github.com/AntonioDell/vee-validate-zod-example

  1. Create a simple form with a zod schema and composition api
  2. Get the meta object from useForm, e.g. const {meta} = useForm(...)
  3. Change something in an input field of the form and enter a different field to trigger the blur
  4. meta.touched is still false

Version

Vue.js 3.x and vee-validate 4.x

What browsers are you seeing the problem on?

Relevant log output

No response

Demo link

https://github.com/AntonioDell/vee-validate-zod-example

Code of Conduct

mawadSur commented 1 month ago

same issue