Skip to content

Commit aace776

Browse files
committed
docs: added zod refine and superrefine warning closes #4338
1 parent 32537e1 commit aace776

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

docs/src/pages/guide/composition-api/getting-started.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,12 @@ Here is a full example using zod with `useForm`:
274274

275275
<Repl files={{ 'App.vue': 'CompositionZodBasic' }} client:only />
276276

277+
<DocTip title="refine/superRefine">
278+
279+
There is a known issue with Zod's `refine` and `superRefine` not executing whenever some object keys are missing which is common with forms. This is not an issue with vee-validate as it is a design choice in Zod at the moment. Refer to [this issue](https://github.com/logaretm/vee-validate/issues/4338) for explanations and further reading.
280+
281+
</DocTip>
282+
277283
### Validating with global validators
278284

279285
Another option is using `@vee-validate/rules` which have been historically bundled with past versions of vee-validate. It includes rules that can be defined globally and then used anywhere using Laravel-like string expressions.

docs/src/pages/guide/composition-api/typed-schema.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ handleSubmit(submitted => {
226226
});
227227
```
228228

229+
<DocTip title="refine/superRefine">
230+
231+
There is a known issue with Zod's `refine` and `superRefine` not executing whenever some object keys are missing or not filled which is common with forms. This is not an issue with vee-validate as it is a design choice in Zod at the moment. Refer to [this issue](https://github.com/logaretm/vee-validate/issues/4338) for explanations and further reading.
232+
233+
</DocTip>
234+
229235
### Zod default values
230236

231237
You can also define default values on your zod schema directly and it will be picked up by the form:

docs/src/pages/integrations/zod-schema-validation.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,9 @@ const onSubmit = handleSubmit(values => {
164164
You can find more information on how typed schemas work in vee-validate [here](/guide/composition-api/typed-schema#zod)
165165

166166
</DocTip>
167+
168+
<DocTip title="refine/superRefine">
169+
170+
There is a known issue with Zod's `refine` and `superRefine` not executing whenever some object keys are missing which is common with forms. This is not an issue with vee-validate as it is a design choice in Zod at the moment. Refer to [this issue](https://github.com/logaretm/vee-validate/issues/4338) for explanations and further reading.
171+
172+
</DocTip>

0 commit comments

Comments
 (0)