Add visible password requirements with live validation checklist
- Add PasswordRequirements component showing rules with live checkmarks
- Add PASSWORD_RULES and PASSWORD_VALIDATION constants
- Update sign-up and reset-password forms to show requirements
Summary by CodeRabbit
- New Features
- Added real-time password requirement feedback to sign-up and password reset forms. Users now see visual indicators showing which password criteria are met as they type, providing clearer guidance on password complexity requirements.
@Chukwuebuka-2003 is attempting to deploy a commit to the ravixalgorithm's projects Team on Vercel.
A member of the Team first needs to authorize it.
Shared password validation constants and a visual requirements component are added and integrated into authentication forms. The constants define validation rules and patterns; the component displays real-time feedback via icons. Both sign-up and reset-password forms adopt the shared validation and component to replace inline rules. Password Validation and Requirements 🎯 2 (Simple) | ⏱️ ~12 minutes 🐰 A password grows strong with each rule we declare,
Check, check, and check—requirements laid bare!
From constants to components, validation flows tight,
Two forms now united with feedback so bright. ✨ ✏️ Tip: You can configure your own custom pre-merge checks in the settings.📝 Walkthrough
Walkthrough
Changes
Layer / File(s)
Summary
Password validation constants
lib/constants.tsExports
PASSWORD_RULES (array of label and test predicate pairs for constraints) and PASSWORD_VALIDATION (form validation object with regex, required, and min-length messages).
PasswordRequirements feedback component
components/forms/PasswordRequirements.tsxNew client component consuming
PASSWORD_RULES to render password requirement checklist with conditional check/cross icons and styling based on rule satisfaction and password length.
Auth form integrations
app/(auth)/sign-up/page.tsx, app/(auth)/reset-password/ResetPasswordForm.tsxSign-up and reset-password forms import the new component and validation constant, replace inline rules with
PASSWORD_VALIDATION, add field watching for real-time feedback, and render PasswordRequirements with the current password value.Estimated code review effort
Poem
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name
Status
Explanation
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
✅ Passed
The title accurately describes the main change: adding a visible password requirements component with live validation feedback, which aligns with the core functionality across all modified files.
Docstring Coverage
✅ Passed
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check
✅ Passed
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
✅ Passed
Check skipped because no linked issues were found for this pull request.
✨ 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 @coderabbitai help to get the list of available commands and usage tips.
Thanks @Chukwuebuka-2003 for contributing to ODS