-
Notifications
You must be signed in to change notification settings - Fork 22
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
Improve form support #144
Merged
Merged
Improve form support #144
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ce4b943
to
e176f03
Compare
e176f03
to
fab30cb
Compare
fab30cb
to
b0f616c
Compare
b0f616c
to
7b886ca
Compare
7b886ca
to
02dfee1
Compare
02dfee1
to
c454794
Compare
c454794
to
9c0dc41
Compare
e935e70
to
228e13a
Compare
d2860f2
to
95e53ff
Compare
95e53ff
to
ecc7dbd
Compare
ecc7dbd
to
66d59d6
Compare
This adds support for strongly-typed form data using the `zod-form-data` schema that are now supported alongside regular Zod schemas. Pages router router routes now support validating and strongly typing form data requests that have the `application/x-www-form-urlencoded`, whereas app router routes also support strongly typed `multipart/form-data` requests using the `req.formData()` method from the NextRequest object. Because RPC routes share the common `rpcOperation` method for both pages and app router, strongly typed form data is for now only supported with the `application/x-www-form-urlencoded` content type. (+1 squashed commit) Squashed commits: [5e4cf8d] Improve form support This adds support for strongly-typed form data using the `zod-form-data` schema that are now supported alongside regular Zod schemas. Pages router router routes now support validating and strongly typing form data requests that have the `application/x-www-form-urlencoded`, whereas app router routes also support strongly typed `multipart/form-data` requests using the `req.formData()` method from the NextRequest object. Because RPC routes share the common `rpcOperation` method for both pages and app router, strongly typed form data is for now only supported with the `application/x-www-form-urlencoded` content type.
66d59d6
to
492fce4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for strongly-typed
form data using the
zod-form-data
schema that are now supported alongside
regular Zod schemas.
Pages router router routes now support
validating and strongly typing form data
requests that have the
application/x-www-form-urlencoded
,whereas app router routes also support strongly typed
multipart/form-data
requests using thereq.formData()
method from the NextRequest object.
Because RPC routes share the common
rpcOperation
method for both pages and app router, strongly typed form
data is for now only supported with the
application/x-www-form-urlencoded
content type.