partialSafeParseDeep ? #6
Unanswered
lukasa1993
asked this question in
Q&A
Replies: 2 comments
-
Your question lacks specificity. Please add more info so I am able to help. Otherwise, please feel free to refer to the docs: |
Beta Was this translation helpful? Give feedback.
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' } } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
what is best way to use this with z.object with nested z.objects
Beta Was this translation helpful? Give feedback.
All reactions