Skip to content

Add JS validation when passwords do not match #3197

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

Closed
nlhkabu opened this issue Mar 9, 2018 · 4 comments
Closed

Add JS validation when passwords do not match #3197

nlhkabu opened this issue Mar 9, 2018 · 4 comments
Labels
javascript requires change to JavaScript files usability UX/UI design, user experience, user interface

Comments

@nlhkabu
Copy link
Contributor

nlhkabu commented Mar 9, 2018

It would be nice to use JavaScript to indicate whether or not the passwords match:

  1. show a message
  2. conditionally enable the button

screenshot from 2018-03-09 06-36-40


screenshot from 2018-03-09 06-36-40-match

@yeraydiazdiaz would this be something you might enjoy working on?

@nlhkabu nlhkabu added UX/UI design, user experience, user interface usability javascript requires change to JavaScript files user testing labels Mar 9, 2018
@yeraydiazdiaz
Copy link
Contributor

Sure, I'll take the opportunity to rewrite the feature in Stimulus.

Disabling the submit button was something we explored before and decided against it. We are now using a pattern where feedback is given when clicking on the submit button in the form of tooltips.

Do we want to mix both feedback flows?

@di
Copy link
Member

di commented Mar 9, 2018

@yeraydiazdiaz Great question. The submit button disabling was a problem on the registration form because there wasn't a way to provide feedback if the user was missing one of the required fields.

I think here it's OK, since it should be pretty clear to the user that they need to fill out the password field in order to be able to change their password, and we'll be able to conditionally show the "passwords match"/"don't match" message when the first field is filled out.

@yeraydiazdiaz
Copy link
Contributor

@nlhkabu which CSS classes are you using for the messages? The closest thing I'm finding are badges and don't quite look the same

@nlhkabu
Copy link
Contributor Author

nlhkabu commented Mar 10, 2018

@yeraydiazdiaz you could use warehouse/static/sass/blocks/_form-errors.scss to display the error.
For the green, you could create a .form-error--valid modifier on this component. Let me know if you need a hand with that - if you prefer you could push the PR unstyled and I can add a commit for this :)

@brainwane brainwane added this to the Cool but not urgent milestone Mar 12, 2018
yeraydiazdiaz pushed a commit to yeraydiazdiaz/warehouse that referenced this issue Mar 17, 2018
@di di closed this as completed in #3219 Mar 19, 2018
di pushed a commit that referenced this issue Mar 19, 2018
* Disable form and show warning on mismatch when updating password (#3197)

* Add password match feature to register and reset password forms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript requires change to JavaScript files usability UX/UI design, user experience, user interface
Projects
None yet
Development

No branches or pull requests

4 participants