Skip to content

Conversation

@ADARSHsri2004
Copy link
Contributor

@ADARSHsri2004 ADARSHsri2004 commented Nov 6, 2025

Description

Implemented server-side request validation using Zod to ensure data integrity and prevent malformed inputs across API endpoints.

Key Highlights

  • Added centralized validateRequest middleware for schema-based validation.
  • Created validation schemas in src/validation/:
    • userValidation.ts → Register and Login routes
    • cartValidation.ts → Add, Update, Remove, Checkout Cart
    • productValidation.ts → Create, Update, Delete, and Fetch Products
  • Integrated middleware in all respective route files:
image

Semver Changes

  • Patch (bug fix, no new features)
  • Minor (new features, no breaking changes)
  • Major (breaking changes)

Issues

Closes #33

Checklist

@04shubham7
Copy link
Member

@ADARSHsri2004 can you add ss of live project

@ADARSHsri2004
Copy link
Contributor Author

@04shubham7 i have added ss

@04shubham7 04shubham7 merged commit ff8fb46 into OPCODE-Open-Spring-Fest:main Nov 8, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Implement server-side request validation using schema validation (Joi, Zod)

2 participants