Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
How do you specify a field that must be either a string or a number in Zod?
z.mixed([z.string(), z.number()])
z.string().number()
z.string().or(z.number())
z.union([z.string(), z.number()])
z.alternate(z.string(), z.number())
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!