Skip to content

[UPDATE] Add Validation for Password in Registration Page #46

@IAMAP842

Description

@IAMAP842

Add Validation for Password in Registration Page

Description

The password field on the registration page currently lacks proper validation to enforce password strength. This validation is necessary to enhance the security of user accounts by ensuring that passwords meet a minimum complexity standard.


Task Details

  1. File to Modify:
    The password validation logic should be added to the registration page, located at Codebase/frontend/src/pages/register.jsx.

  2. Validation Requirement:
    The password must meet the following criteria:

    • At least 6 characters long.
    • Contain at least one uppercase letter.
    • Contain at least one lowercase letter.
    • Contain at least one digit.
    • Contain at least one special character (e.g., !@#$%^&*()).

    If the input is invalid, display an error message:
    "Password must be at least 6 characters long and include one uppercase letter, one lowercase letter, one digit, and one special character."

  3. Testing:

    • Verify that the password field enforces all the specified validation criteria.
    • Test various scenarios, including passwords that:
      • Fail to meet one or more criteria.
      • Meet all criteria.
    • Ensure invalid inputs show the appropriate error message.
  4. Follow Pull Request Guidelines:

    • Use a regular expression or other appropriate validation methods to enforce this constraint.
    • Follow the Pull_request_template.md file when submitting the Pull Request.

Metadata

Metadata

Labels

EasyDifficulty level is easybugSomething isn't workinggood first issueGood for newcomers

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions