All quizzes
Free quiz · 27 questions in the bank

Zod quiz

Test your Zod knowledge with a free interactive quiz — 27 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

`schema.transform(fn)` does what?

In this round
  1. `schema.transform(fn)` does what?
  2. How do you make a field accept `null` but not be omitted?
  3. `z.string().regex(/^[a-z0-9-]+$/)` does what?
  4. `schema.pick({ name: true })` and `schema.omit({ email: true })` are used to:
  5. `z.discriminatedUnion("kind", [schemaA, schemaB])` is preferred over `z.union` when:
  6. How do you validate that a value is a positive integer?
  7. Which is the right Zod schema for a plain string?
  8. Which adds a length range to a string schema?
  9. `z.string().default("anonymous")` does what?
  10. `type User = z.infer<typeof userSchema>` is used to:
  11. Popular pairings for Zod in the TypeScript ecosystem include:
  12. `objectSchema.extend({ extra: z.string() })` does what?
Gaps to close?
Read the curated Zod notes — core concepts, patterns, interview prep.
Zod notes

More quizzes

.NETAccessibilityAgile MethodologyAirflowAlertmanagerAlgorithms