Replies: 1 comment
-
If I'm not mistaken the idea is that the GET handler will run before the POST handler when a POST is submitted, where you can get your data as you would normally. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a question about this section in the migration guide, having to do with
+page.server.js
. The guide says:In this case (form validation errors occurring) it's unclear to me how the originally posted form data gets put back onto the page. For example:
{name: '$#!@%^$', breed: 'yellow'}
to/kittens/add
POST
function returns{errors: {name: 'Kitten name must not contain bad words.'}}
What happens now? Am I expected to have a
GET
function that (re-)reads the response body and sticks that intodata
? Does SvelteKit do this for me?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions