Skip to content

feat: expand Zod request validation to all server routes#43

Open
saurabhhhcodes wants to merge 1 commit into
Pushkarini579:mainfrom
saurabhhhcodes:codex/zod-validation-41
Open

feat: expand Zod request validation to all server routes#43
saurabhhhcodes wants to merge 1 commit into
Pushkarini579:mainfrom
saurabhhhcodes:codex/zod-validation-41

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Adds Zod validation schemas for auth (signup/login) and report ID endpoints, returning consistent 400 errors with field-level details on failure.

  • POST /api/auth/signup: name (min 2), email, password (min 6)
  • POST /api/auth/login: email, password (required)
  • GET /api/report/:id: MongoDB ObjectId format check

Closes #41

Adds Zod validation schemas for:
- POST /api/auth/signup (name/email/password)
- POST /api/auth/login (email/password)
- GET /api/report/:id (MongoDB ObjectId format check)

Returns consistent 400 Bad Request with field-level error details
when validation fails, matching the existing /api/analyze pattern.

Closes Pushkarini579#41
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Pushkarini 's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Server] Expand Request Body Validation with Zod

1 participant