Skip to content

Add support for Zod in schema validation #1164

@MatthewAry

Description

@MatthewAry

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Currently it seems that the validationSchema feature only uses Joi to validate, however Zod can do much of the same things that Joi can do for validation BUT it also lets you obtain an inferred TypeScript type from the defined schema, which is something that Joi can't do.

Describe the solution you'd like

Make Zod a first class citizen for schema validation.

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

Zod's own docs explain the justification pretty well.

Zod is designed to be as developer-friendly as possible. The goal is to eliminate duplicative type declarations. With Zod, you declare a validator once and Zod will automatically infer the static TypeScript type. It's easy to compose simpler types into complex data structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions