Skip to content

Conversation

Akhileshait
Copy link
Contributor

What does this PR do?

Fixes #4089

This PR fixed Incorrect error which is displayed when creating a key and adding name in input field which shows incorrect error that is "Name is required".

Performance Impact:

  • There is no performance Impact.

Implementation:
Updated Error Message in ratelimit Item Schema from "Name is required" to "Name is required and should have at least 3 characters".

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

Unit Tests

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Copy link

changeset-bot bot commented Oct 18, 2025

⚠️ No Changeset found

Latest commit: 90339ed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 18, 2025

@Akhileshait is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the app:dashboard Unkey dashboard related label Oct 18, 2025
Copy link
Contributor

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor

coderabbitai bot commented Oct 18, 2025

📝 Walkthrough

Walkthrough

Updated the validation error message for the name field in the API key creation schema from "Name is required" to "Name is required and should have at least 3 characters" to accurately reflect the minimum length requirement during validation.

Changes

Cohort / File(s) Change Summary
Validation error message update
apps/dashboard/app/(app)/[workspaceSlug]/apis/[apiId]/_components/create-key/create-key.schema.ts
Updated min length validation error message for name field in ratelimitItemSchema to include the minimum character requirement (3 characters) instead of just stating the field is required

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

Bug

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "fix: Fixed incorrect error for length check in ratelimits section during creating a key" directly and accurately describes the main change in the pull request. According to the code summary, the only modification is updating the validation error message in the ratelimitItemSchema from "Name is required" to "Name is required and should have at least 3 characters". The title is specific, clear, and clearly summarizes this primary change without vague language or unnecessary details.
Linked Issues Check ✅ Passed The PR directly addresses the objective stated in linked issue #4089, which reports that "onboarding shows wrong error" when input fails length validation. The code change updates the error message in ratelimitItemSchema from "Name is required" to "Name is required and should have at least 3 characters", which precisely resolves the issue of displaying an incorrect error message during the length check validation. The implementation directly fulfills the requirement to display the proper validation error.
Out of Scope Changes Check ✅ Passed The pull request modifies only one file with a single, focused change: updating a validation error message in ratelimitItemSchema. This change is directly scoped to resolving issue #4089 regarding the incorrect error message displayed during length validation. No additional modifications, refactoring, or unrelated code changes are present in the changeset.
Description Check ✅ Passed The PR description follows the repository template and includes all major required sections: it clearly states "Fixes #4089" with context about the issue, marks the appropriate type of change (Bug fix, Chore, Enhancement), includes testing instructions ("Unit Tests"), and completes all required checklist items. The author explains the performance impact, provides implementation details about the error message update, and demonstrates thorough preparation with merged main branch and code quality checks.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c764837 and 90339ed.

📒 Files selected for processing (1)
  • apps/dashboard/app/(app)/[workspaceSlug]/apis/[apiId]/_components/create-key/create-key.schema.ts (1 hunks)
🔇 Additional comments (1)
apps/dashboard/app/(app)/[workspaceSlug]/apis/[apiId]/_components/create-key/create-key.schema.ts (1)

119-141: Fix addresses the reported issue accurately.

The updated error message on line 123 now correctly describes the validation requirement. The message "Name is required and should have at least 3 characters" is clear and actionable, helping users understand exactly what failed during validation. This directly resolves issue #4089 where the UI was displaying an incomplete error message.


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.

@Akhileshait
Copy link
Contributor Author

Hi @chronark @perkinsjr Please review this PR

Copy link

vercel bot commented Oct 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
dashboard Ready Ready Preview Comment Oct 19, 2025 1:36pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app:dashboard Unkey dashboard related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboarding displays incorrect error for length check

1 participant