HyphaApp / hypha

Submission management software for open calls
https://www.hypha.app
BSD 3-Clause "New" or "Revised" License
69 stars 38 forks source link

Fix error message alignment for change password form #3868

Closed theskumar closed 6 months ago

theskumar commented 6 months ago

Inline error messages

Screenshot 2024-04-10 at 5  58 42@2x

Fixes https://github.com/HyphaApp/hypha/issues/3842

Test Steps

frjo commented 6 months ago

Can we have the error message pop up on the "New password" field instead of the "New password confirmation" field?

theskumar commented 6 months ago

Can we have the error message pop up on the "New password" field instead of the "New password confirmation" field?

let me take a stab at it. I believe it's the Django's default password change form.

theskumar commented 6 months ago

Can we have the error message pop up on the "New password" field instead of the "New password confirmation" field?

I cross checked and the validation logic comes from the default ChangePassword View/Form from Django. So I would try avoid changing the position of the error message unless you have a strong opinion/need for it. Also, in the latest version of Django the code related to validation of passwords has been updated, so I would advice we don't implement a custom validate logic which will then need to be maintained.

Thinking out loud, the validation error messages in the screenshot is shown only after both the passwords match, so I think it might be too confusing to users.