Use Zod or similar validation on all API routes and server actions. Never pass raw user input to database queries.
Why This Matters
Unvalidated input can cause type errors, constraint violations, or injection attacks. Validation at the boundary catches these early.
Tags
nextjssupabase
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and 2+ others. Get actionable feedback before code ships.