vee-validate icon indicating copy to clipboard operation
vee-validate copied to clipboard

`meta.touched` not changing with useForm and zod

Open AntonioDell opened this issue 1 year ago • 1 comments

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?

  • [X] Firefox
  • [X] Chrome
  • [ ] Safari
  • [ ] Microsoft Edge

Relevant log output

No response

Demo link

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

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

AntonioDell avatar Feb 21 '24 05:02 AntonioDell