vee-validate
vee-validate copied to clipboard
fix: send transformed values as submitted values with useField
🔎 Overview
This PR allows transforms to be sent through as the submitted value when the
transform is used in useField
and not as a high-level object schema.
🤓 Code snippets/examples (if applicable)
See the added test to zod.spec.ts
const testRules = toTypedSchema(z.string().transform(value => `modified: ${value}`));
const { value } = useField('test', testRules);
This functionally works but definitely needs some help with the internal types. Not sure how to make them work in the greater scheme without a lot more effort and could use some guidance. Thank you!
@logaretm Is there anything I can help with to get this merged and released?