-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement real-time password validation for the registration form #9165
Comments
May I take this issue? |
Thanks, @devesh-2002. Let me know if you have any questions. |
Today I learned that this issue is related to #2055, which is currently being worked on by @rebecca-shoptaw. In addition to removing the @devesh-2002, can you hold off on creating a pull request for this issue until the new requirements are added here? Sorry for the late changes... If this is too much of a hassle, feel free to look for other good first issues. |
Thanks for the update, @jimchamp. I'll hold off on creating the pull request for now and await the additional requirements from @rebecca-shoptaw. |
Note: Another PR may be coming in to handle the Hi @devesh-2002, thanks so much for taking this on! As part of #2055, we'll need to do a true re-write of this function, rather than simply removing the To make this a little easier, I've just done a quick PR (#9190) to clean up and streamline the jQuery functions required and fix a bug in the error rendering methods, so you'll want to wait on doing this PR until that one is merged (thus Once that's merged, this is what we'll want from the rewrite:
Most of this logic is already written, so this PR will just involve rewriting the The only slightly finicky element of it is the JavaScript internationalization process which is necessary for making the error message accessible to translators, but I've spelled out the process in detail below, and you can find many examples of it throughout the codebase. 🙂 And here's the process you'll want to follow:
That's it!! You're welcome to get started on the internationalization before the |
@devesh-2002 we've been looking at the landscape of the registration form and we've decided that this one might not be as "good first issue" as we initially thought, and it might be best for @rebecca-shoptaw to tackle this as part of her larger registration page work. You can find some other good first issues here: https://github.com/internetarchive/openlibrary/issues?q=is%3Aissue+is%3Aopen+label%3A%22Good+First+Issue%22 . Perhaps this one #9141 ? Apologies for any confusion! |
Problem
Whenever we removed the second password field from the account registration page, we forgot to remove the code that validates that field's input. The validation function is triggered when the existing password field is blurred, and causes errors when attempting to get the value of the missing field.
Evidence / Screenshot
Relevant URL(s)
https://openlibrary.org/account/create
Reproducing the bug
Context
Notes from this Issue's Lead
Proposal & constraints
Remove references to the
#password2
element from the client-side real-time password validation function. Update any existing unit tests for this function.Related files
Password validation function:
openlibrary/openlibrary/plugins/openlibrary/js/realtime_account_validation.js
Lines 68 to 88 in 2827e41
Real-time validation unit tests:
https://github.com/internetarchive/openlibrary/blob/2827e41998825d4ef99fbdc1bc1f3751358102d1/tests/unit/js/realtime_account_validation.test.js
Be sure to update the function name to
validatePassword
, now that only one password is being validated.Stakeholders
The text was updated successfully, but these errors were encountered: