Skip to content

Fix error on the sign up page for password requirements

What does this MR do and why?

  • @JeremyWuuuuu started a discussion:

    I am experiencing this issue right now when the FF was not turned on, meaning that USER_INFO cannot be found within the ruleset, here this.findRule(USER_INFO) would be returning undefined back to checkValidity, which will cause error.

    CleanShot_2024-12-17_at_14.12.45_2x

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-12-17_at_11.28.06 Screenshot_2024-12-17_at_11.28.41

How to set up and validate locally

bin/rails c

Feature.disable(:display_password_requirements)
Click to expand Screenshot_2024-11-28_at_14.14.18
  • Sign out. Visit /users/sign_up.
  • Open browser console.
  • Fill the first name with tttt.
  • Make sure there is no error on reading type.
bin/rails c

Feature.enable(:display_password_requirements)
  • Reload the page.
  • Fill the form with valid data.
  • Make sure you can submit the form.

Related to #509890 (closed)

Edited by Serhii Yarynovskyi

Merge request reports

Loading