OpenStock icon indicating copy to clipboard operation
OpenStock copied to clipboard

Add visible password requirements with live validation checklist

Open Chukwuebuka-2003 opened this issue 6 months ago • 2 comments

  • 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
image

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.

Review Change Stack

Chukwuebuka-2003 avatar May 26 '26 13:05 Chukwuebuka-2003

@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.

vercel[bot] avatar May 26 '26 13:05 vercel[bot]

📝 Walkthrough

Walkthrough

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.

Changes

Password Validation and Requirements

Layer / File(s) Summary
Password validation constants
lib/constants.ts
Exports 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.tsx
New 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.tsx
Sign-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

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 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. ✨

🚥 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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests

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.

coderabbitai[bot] avatar May 26 '26 13:05 coderabbitai[bot]

Thanks @Chukwuebuka-2003 for contributing to ODS

ravixalgorithm avatar May 28 '26 18:05 ravixalgorithm