Open
Conversation
…d validation logic runs for both password fields at the same time. When entering the first password, the second password field is empty, which causes the 'passwords do not match' error. This can be fixed by updating the code as follows:
VishnuSanal
requested changes
Dec 30, 2024
Member
VishnuSanal
left a comment
There was a problem hiding this comment.
@enescakar2148 thanks for your interest in contributiong to amaze! one formatting change, and your're done, this PR LGTM 🚀
VishnuSanal
requested changes
Dec 31, 2024
Member
VishnuSanal
left a comment
There was a problem hiding this comment.
Pls revert the changes/additions made to the JSON file.
EmmanuelMess
approved these changes
Mar 12, 2025
Member
|
Please check CI. |
Member
|
Any updates @enescakar2148 ? This is already approved. |
Author
|
Unfortunately, I couldn't add an update because I was working too hard. I hope I can make new additions as soon as possible🙏 |
Member
|
Okay, the test that is not passing is EncryptAuthenticateDialogTest::testPasswordValidations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The cause of the error is that the password validaion logic runs for both password fields at the same time. When entering the first password, the second password field is empty, which causes the 'passwords do not match' error. This can be fixed by updating the code as follows:
Fixes #4304
Issue tracker
Changes made:
The logic for the first password field validation has been updated:
• If the first password is not empty, proceed.
• If the second password field is empty or if the passwords match, proceed.
• If the file name is valid, proceed with “OK”.
Error conditions:
• If the first password is empty: “field_empty” error.
• If the second password is entered and does not match: “password_no_match” error.
• If the file name is invalid: “empty_string” error.
With this change:
• No error will be shown when entering the first password.
• When entering the second password, the matching check will be performed.
• If the passwords do not match, an error will be shown.
This improves the user experience by avoiding unnecessary error messages when entering the first password, and only showing the mismatch error when the second password is entered.
Contributors: