Make serverValidate return the validated data #1317
Unanswered
SebbeBroman
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's a bit unclear how to work with the validated data after you have run serverValidate. From #778 there was a answer that "You don't! At least not from our API. You parse formData again manually using your tool of choice. I would suggest using the same as we do internally (decode-formdata), but you can use any tool you'd like.".
Wouldn't it be better if we updated the api for serverValidate to return Promise instead of Promise?
Then we could use the data parsed data directly, typed and already parsed, not needing to decode the form data twice.
Beta Was this translation helpful? Give feedback.
All reactions