-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encode action result in cookie (#12016)
* Encode action result in cookie * Add a changeset
- Loading branch information
Showing
6 changed files
with
115 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixes actions with large amount of validation errors |
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
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
43 changes: 43 additions & 0 deletions
43
packages/astro/e2e/fixtures/actions-blog/src/pages/lots-of-fields.astro
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
export const prerender = false; | ||
import { actions } from 'astro:actions'; | ||
const result = Astro.getActionResult(actions.blog.lotsOfStuff); | ||
--- | ||
|
||
<html> | ||
<head> | ||
<title>Actions</title> | ||
<style> | ||
form { | ||
display: grid; | ||
grid-row-gap: 10px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<form method="POST" action={actions.blog.lotsOfStuff} data-testid="lots"> | ||
<input type="text" name="one" value=""> | ||
<span class="one error">{result?.error?.fields.one}</span> | ||
<input type="text" name="two" value=""> | ||
<span class="two error">{result?.error?.fields.two}</span> | ||
<input type="text" name="three" value=""> | ||
<span class="three error">{result?.error?.fields.three}</span> | ||
<input type="text" name="four" value=""> | ||
<span class="four error">{result?.error?.fields.four}</span> | ||
<input type="text" name="five" value=""> | ||
<span class="five error">{result?.error?.fields.five}</span> | ||
<input type="text" name="six" value=""> | ||
<span class="six error">{result?.error?.fields.six}</span> | ||
<input type="text" name="seven" value=""> | ||
<span class="seven error">{result?.error?.fields.seven}</span> | ||
<input type="text" name="eight" value=""> | ||
<span class="eight error">{result?.error?.fields.eight}</span> | ||
<input type="text" name="nine" value=""> | ||
<span class="nine error">{result?.error?.fields.nine}</span> | ||
<input type="text" name="ten" value=""> | ||
<span class="ten error">{result?.error?.fields.ten}</span> | ||
<button type="submit">Submit</button> | ||
</form> | ||
</body> | ||
</html> |
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
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