Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Which of the following are the correct ways to define an optional field in Zod?
z.string().optional()
z.string()
z.optional(z.string())
z.optional().string()
z.string().nullable()
z.nullable().string()
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!