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

new_password2 validation is wrong when new_password does not validate (password strength) #110

Open
maxpeterson opened this issue Mar 16, 2015 · 1 comment
Labels

Comments

@maxpeterson
Copy link
Member

If you post two matching passwords that do not fulfil the password strength validation rules then the endpoint responds that new_password2 does not match

{
  "new_password": ["Password must have at least one upper case letter, one lower case letter, and one number."], 
  "new_password2": ["Your new passwords do not match."]
}
@kevinetienne
Copy link
Contributor

When updating and changing a password we have 2 validators:

If password_strength_validation raises an error the value for new_password would not be in the data and validate_new_password2 will raise another error as new_password would be None.

Looks like we should have a validate method where we can decide on the order of the validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants