partialSafeParseDeep ? #6
Answered
by
JacobWeisenburger
lukasa1993
asked this question in
Q&A
Replies: 2 comments 4 replies
|
Your question lacks specificity. Please add more info so I am able to help. Otherwise, please feel free to refer to the docs: |
0 replies
|
@JacobWeisenburger heres example: const a = z.object({
a: z.string(),
b: z.object({
a: z.string(),
b: z.string(),
}),
});
const payload = {
a: "1234",
b: {
b: "1",
},
};
console.log(zu.partialSafeParse(a, payload).validData);this returns { a: '1234' }so with maybe it can return { a: '1234', b: { b: '1' } } |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
what is best way to use this with z.object with nested z.objects
All reactions