Skip to content

Commit 1ca1008

Browse files
authored
minor phrasing change on HTTP status revalidation (#14197)
1 parent 064d0f6 commit 1ca1008

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/how-to/form-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export async function action({
8989

9090
If any validation errors are found, they are returned from the `action` to the fetcher. This is our way of signaling to the UI that something needs to be corrected, otherwise the user will be redirected to the dashboard.
9191

92-
Note the `data({ errors }, { status: 400 })` call. Setting a 400 status is the web standard way to signal to the client that there was a validation error (Bad Request). In React Router, only 200 status codes trigger page data revalidation so a 400 prevent that.
92+
Note the `data({ errors }, { status: 400 })` call. Setting a 400 status is the web standard way to signal to the client that there was a validation error (Bad Request). In React Router, only 2xx status codes trigger page data revalidation, so sending a 400 status prevents the normal revalidation that would occur after an `action`.
9393

9494
## 3. Displaying Validation Errors
9595

0 commit comments

Comments
 (0)