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:
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: