fix: correct invalid Zod email validation in auth router#352
fix: correct invalid Zod email validation in auth router#352sahilcommit wants to merge 1 commit intoapsinghdev:mainfrom
Conversation
|
@sahilcommit is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip Migrating from UI to YAML configuration.Use the |
Problem:
The email field in the Google authentication schema is defined using z.email(), which is not a valid Zod API and may lead to incorrect validation behavior.
z.email() is not part of Zod API
Solution:
Replaced the incorrect usage with:
z.string().email("Invalid email format")
Impact:
Ensures correct email validation
Prevents potential runtime issues
Aligns with Zod best practices
Scope:
This is a minimal and isolated fix.
Summary by CodeRabbit