Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zod): support multipart/form-data #1920

Merged

Conversation

healtheloper
Copy link
Contributor

Status

READY

Description

Fix #1741

It appears that z.custom<File>() or z.instanceof(File) can be used to check for a File.
Since i can't determine whether the user is using TypeScript, i opted for z.instanceof(File).
However, this validation may have compatibility issues depending on the Node.js version (requires Node v20.0 or later).

Related PRs

List related PRs against other branches:

branch PR
N/A N/A
N/A N/A

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Added test cases

@melloware melloware merged commit e77b7fd into orval-labs:master Feb 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with generating Zod validation for form data
2 participants