Validating with Zod not applying the .transform()
method for useField()
#4713
Labels
🛳 In PR
This issue is being addressed in a PR
.transform()
method for useField()
#4713
What happened?
I'm using the
.transform()
method to edit the data to be sent to the form submit function.It works well for fields declared with
defineField()
method but not for custom inputs / fields declared withuseField()
method.In the second case, the value is submitted without being transformed, even though it is being validated. Neither the
transform()
function nor the zod string transformations ( liketoUppoerCase()
) work.Reproduction steps
useField()
with a Zod validation schema!!! I have note tested for Safari
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://stackblitz.com/edit/vitejs-vite-mrsjdx?file=src%2FApp.vue,src%2Fcomponents%2FForm1.vue,src%2Fcomponents%2FForm2.vue,src%2Fcomponents%2FInputText.vue&terminal=dev
Code of Conduct
The text was updated successfully, but these errors were encountered: