Skip to content
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

Add password: validate field length #23366

Merged
merged 4 commits into from Jun 27, 2018
Merged

Conversation

maddiedierker
Copy link
Contributor

This adds front-end validation for passwords that are too short (less than 6 characters). Rather than allowing the user to submit the form and get a validation error from the server, AddPasswordForm displays a field error and disables the form until the passwords have the appropriate length (and match).

Before

Form submission was enabled, but the server would return an error:
screen shot 2018-06-27 at 11 09 10 am

After

Form submission is disabled, individual fields display validation errors:
screen shot 2018-06-27 at 11 08 44 am

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@maddiedierker maddiedierker merged commit 32fde85 into staging Jun 27, 2018
@maddiedierker maddiedierker deleted the add-password-validate-length branch June 27, 2018 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants