Repository navigation
fix: add constraint on name schema - #2866
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR tightens the shared ZNameSchema validation used across auth/profile-related flows by adding an upper bound on allowed name length.
Changes:
- Add a
.max(255)constraint toZNameSchemato reject excessively long names.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export const ZNameSchema = z | ||
| .string() | ||
| .trim() | ||
| .min(3, { message: 'Please enter a valid name.' }) | ||
| .max(255, { message: 'Name cannot be more than 255 characters.' }) | ||
| .refine((value) => !URL_PATTERN.test(value), { |
No description provided.