"Change my password " form validation errors
Steps to reproduce
- Visit the page at /settings
- Use "Change my password" form
- Set correct old password and an invalid new one (123 for instance)
- Click on "Change password" button
What happens?
- First the error returned by the server it's not being taken into account:
{"new_password2":["This password is too short. It must contain at least 8 characters.","This password is too common.","This password is entirely numeric."]}
If the response status is 400 it always show the same message, no matter if the old password is wrong or the new one is not valid.
- Second, the "Change your password?" popup shouldn't show up since the server validation has already failed. We could save a click.
What is expected?
Show a more specific validation error, since it's already available. And do it before the "Change your password" popup shows up.
Context
Funkwhale version(s) affected: that's always been the behavior implemented.