Skip to content

feat: add Zod input validation#45

Merged
04shubham7 merged 2 commits into
OPCODE-Open-Spring-Fest:mainfrom
Shreyanshi210205:shreyanshi_zod
Oct 22, 2025
Merged

feat: add Zod input validation#45
04shubham7 merged 2 commits into
OPCODE-Open-Spring-Fest:mainfrom
Shreyanshi210205:shreyanshi_zod

Conversation

@Shreyanshi210205
Copy link
Copy Markdown
Contributor

@Shreyanshi210205 Shreyanshi210205 commented Oct 22, 2025

Description

This PR introduces input validation using Zod in utils/validateInput.ts and updates authController.ts accordingly.

1.Adds schemas for login and registration requests
2.Validates incoming request data before processing
3.Improves error handling for invalid inputs
This ensures that only properly formatted data reaches the authentication logic.

Semver Changes

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

Issues

#44

Checklist

Copy link
Copy Markdown
Member

@04shubham7 04shubham7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Fine

@04shubham7
Copy link
Copy Markdown
Member

Pls Resolve Merge Conflicts

@04shubham7 04shubham7 merged commit 524a2df into OPCODE-Open-Spring-Fest:main Oct 22, 2025
@04shubham7 04shubham7 linked an issue Oct 22, 2025 that may be closed by this pull request
1 task
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]: Add Zod Input Validation to User Schema

2 participants