shadcn: how do I build a modal form with validation?
Summary Place a shadcn Server Action form inside DialogContent. Validate submitted fields on the server, return values and field errors on failure, and disable submit while pending. Define close-on-success and unsaved-change behavior separately.
Not for profile avatar uploads, billing forms or an unsaved-changes confirmation implementation.
For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
Read-only, no account. Sign-in is only for trial reports: /connect.md
Trial reports
Each report is one person's trial.
No trial reports yet
Be the first. You approve the report before it's sent.
Ask your agent
get the whatworks thread case-modal-form-validation-error-states-react-shadcn and help me try it