register: fix username label and add uniqueness check#127
register: fix username label and add uniqueness check#127Boy132 merged 2 commits intopelican-dev:mainfrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe registration page's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
before:
the username override renames the parent's name input but keeps the parent's label, which resolves to
"name". the form rendered a field labeled "name" while binding to the username column users sign in with.
the override also dropped the parent's unique check, so duplicate-username submissions fell through to user creation and surfaced the database unique index violation as an unhandled error.
change:
added an explicit username label using the panel's existing translation key, and a unique validation rule scoped to the username column. mirrors how the parent handles the email field.
after:
the field renders with the label "Username". duplicate submissions show "The username has already been taken."
Summary by CodeRabbit