+ Server functions wrapped with{" "}
+ createFunction([zod-schema])(handler). Validation runs at
+ the protocol layer — submit an empty message and the request returns
+ HTTP 400 with x-react-server-action-error: validate_failed{" "}
+ before the handler ever runs.
+
+ Each button below builds an input that{" "}
+ passes TypeScript (the shape is valid) but{" "}
+ fails the Zod schema at the protocol layer. Watch the
+ Network tab in DevTools — every rejection is HTTP 400 with{" "}
+ x-react-server-action-error: validate_failed, and the
+ handler never executes.
+
+ ✓ {lastOk} +
+ )} + {lastError && ( ++ ✗ {lastError} +
+ )} +
+ Server functions wrapped with{" "}
+ createFunction([zod-schema])(handler). Validation runs at
+ the protocol layer — try opening DevTools and submitting an empty
+ message; the request returns HTTP 400 with{" "}
+ x-react-server-action-error: validate_failed and the
+ handler never runs.
+
+ Each button below builds an input that{" "}
+ passes TypeScript (the shape is valid) but{" "}
+ fails the Zod schema at the protocol layer. Watch the
+ Network tab in DevTools — every rejection is HTTP 400 with{" "}
+ x-react-server-action-error: validate_failed, and the
+ handler never executes.
+
+ ✓ {lastOk} +
+ )} + {lastError && ( ++ ✗ {lastError} +
+ )} +