See how the same Zod validation schemas work on both client and server
Both forms use demoContactSchema from @cf-stack/types. The validation rules are defined once and used everywhere.
Try the same invalid input in both forms. You'll see the exact same error message - whether validated on client or server.
Client-side validation provides instant feedback without network requests. Users get immediate error corrections.
Server-side validation is essential for security. Never trust client input - always validate on the server too!
packages/types/src/validation/demo.validation.ts
→ Shared by frontend (React) and backend (Hono)
→ Single source of truth for validation rules
→ No authentication required - perfect for demos!