Skip to content

fix: set character limit in schemas as DB limit (25 instead of 20)#23

Open
toto04 wants to merge 2 commits intomainfrom
char-limit
Open

fix: set character limit in schemas as DB limit (25 instead of 20)#23
toto04 wants to merge 2 commits intomainfrom
char-limit

Conversation

@toto04
Copy link
Copy Markdown

@toto04 toto04 commented Mar 30, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7ad65564-874d-4fa4-8ef9-341b27b62392

📥 Commits

Reviewing files that changed from the base of the PR and between a3827fe and 99298c3.

📒 Files selected for processing (1)
  • src/lib/validations.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/lib/validations.ts

Walkthrough

Updated pnpm in package.json and refactored URL validation: increased short code max length from 20 to 25; made editUrlSchema the base and derive createUrlSchema from it; removed the CreateUrlInput export.

Changes

Cohort / File(s) Summary
Package Manager Update
package.json
Updated packageManager from pnpm@10.18.1+... to pnpm@10.33.0+... (integrity hash changed).
URL Validation Schema Updates
src/lib/schemas.ts, src/lib/validations.ts
Increased short_code / shortCode max length from 20 → 25. Refactored validation: editUrlSchema is now the base schema; createUrlSchema is derived by making shortCode optional. Removed exported CreateUrlInput type.
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating character limits in schemas from 20 to 25 characters to match the database limit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/lib/validations.ts`:
- Line 7: The validation call currently uses .min(2, "Short code must be at
least 3 characters") which mismatches the error text; update the validator by
changing the .min call to .min(3, "Short code must be at least 3 characters") so
the constraint matches the message (locate the .min(2, ...) invocation in the
validation schema and adjust to .min(3, ...)); if instead you prefer a
2-character minimum, change the error string to "Short code must be at least 2
characters" in the same place.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4996b46e-72c8-4660-b746-e6413bb9e655

📥 Commits

Reviewing files that changed from the base of the PR and between 768f73a and a3827fe.

📒 Files selected for processing (3)
  • package.json
  • src/lib/schemas.ts
  • src/lib/validations.ts

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.

1 participant