Nextjs Server Action Validation

Use when writing a Next.js Server Action that accepts user-submitted form data, mutation parameters, or any client-originated input. Every Server Action is a public HTTP endpoint regardless of how it is called — validate with Zod and check authentication as the first two operations before touching the database. Do NOT use for GET route handlers or Server Components that fetch data (those have no user-supplied input); do NOT use for Stripe webhook handlers (use stripe-webhook-signature-verification instead).

jacob-balslev 1037c16 2 files · 5.6 KB Updated

File contents

jacob-balslev/skill-graph/tree/main/examples/projects/saas-stripe-postgres/skills/nextjs-server-action-validation commit 1037c16c85

Frequently asked questions

npx skillmds@latest add jacob-balslev/nextjs-server-action-validation