Skip to content

Validation Message in Change Password Form #4367

Closed

Description

@mananjadhav

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to Settings Page
  2. Click Change Password
  3. Try to enter different "New Password" and "Confirm New Password"

Expected Result:

It should ideally show a validation message of the password mismatch

Actual Result:

No error message is displayed with the button disabled.

Screenshot 2021-08-02 at 8 03 42 PM

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

Activity

  1. MelvinBot commented on Aug 2, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @zanyrenney (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

  2. removed
    AutoAssignerTriageAuto assign issues for triage to an available triage team member
    on Aug 2, 2021
  3. parasharrajat commented on Aug 2, 2021

    @parasharrajat
    Member

    I think this was already there. Wasn't it?

  4. mananjadhav commented on Aug 2, 2021

    @mananjadhav
    CollaboratorAuthor

    Proposal

    I would want to add two aspects to this:

    1. Show a validation message between when the New Password and Confirm Password don't match
    2. Add a visibility toggle to the Password Fields. This will make it simple for the user to see the issue.

    Approach:

    More or less the implementation looks like the following:

    In the PasswordPage,

    this.state = {
                currentPassword: '',
                newPassword: '',
                confirmNewPassword: '',
                isPasswordRequirementsVisible: false,
                passwordValidationError: '',
                securedTextEntry: {
                    currentPassword: true,
                    newPassword: true,
                    confirmNewPassword: true
                }
            };
    
    

    Add onBlur={() => matchNewPasswords()}

    
    matchNewPasswords() {
        if(this.state.newPassword !== this.state.confirmNewPassword) {
             this.setState({ passwordValidationError: translate('passwordMismatchError')});
        } 
    }
    toggleSecureEntry(fieldKey) {
            this.setState(prevState => {
              return {
                securedTextEntry: {
                    ...prevState.securedTextEntry,
                    [fieldKey]: !prevState.securedTextEntry[fieldKey],
                }
              };
            });
        }
    
    
    {this.state.passwordValidationError && (
                                    <Text style={[styles.formHint, styles.mt1, error]}>
                                        {this.state.passwordValidationError}
                                    </Text>
                                )}
    

    Update the text input to have a toggle icon on the right. We can even move this as a new PasswordField with this visibility prop.

    
    <View style={styles.iconInputSection}> // Some alignment effort is required to get the icon inside the input field.
                                    <TextInput
                                        ref={el => this.currentPasswordInputRef = el}
                                        secureTextEntry={this.state.securedTextEntry.currentPassword}
                                        autoCompleteType="password"
                                        textContentType="password"
                                        style={[styles.textInput, styles.inputWithIcon]}
                                        value={this.state.currentPassword}
                                        onChangeText={currentPassword => this.setState({currentPassword})}
                                        returnKeyType="done"
                                    />
                                    <Pressable style={styles.iconInput} onPress={() => this.toggleSecureEntry('currentPassword')}>
                                        <Icon src={this.state.securedTextEntry.currentPassword ? Eye : EyeSlash }  />
                                    </Pressable>
                                </View>
    
    
  5. mananjadhav commented on Aug 2, 2021

    @mananjadhav
    CollaboratorAuthor

    @parasharrajat Couldn't find that on the Change Password page.

  6. MelvinBot commented on Aug 3, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @nkuoch (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  7. removed their assignment
    on Aug 4, 2021
  8. removed their assignment
    on Aug 4, 2021
  9. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 4, 2021
  10. 15 remaining items

  11. dylanexpensify commented on Aug 4, 2021

    @dylanexpensify
    Contributor

    Hi @mananjadhav! Ah yes, sorry for the oversight. Will update the offer to reflect the correct amount.

  12. dylanexpensify commented on Aug 4, 2021

    @dylanexpensify
    Contributor

    @mananjadhav I've gone ahead and sent over the new offer!

  13. dylanexpensify commented on Aug 4, 2021

    @dylanexpensify
    Contributor

    Confirming @mananjadhav has been hired for this.

  14. mallenexpensify commented on Aug 4, 2021

    @mallenexpensify
    Contributor

    @mananjadhav The $250 bonus for reporting this issue (if you fix it) is added at the end once final payment is made. If @dylanexpensify added it before, that's fine for this job.

  15. mananjadhav commented on Aug 4, 2021

    @mananjadhav
    CollaboratorAuthor

    @mallenexpensify Thanks for clarifying. Noted.

  16. MelvinBot commented on Aug 9, 2021

    @MelvinBot
    Contributor

    @AndrewGable, @dylanexpensify Huh... This is 4 days overdue. Who can take care of this?

  17. MelvinBot commented on Aug 11, 2021

    @MelvinBot
    Contributor

    @AndrewGable, @dylanexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  18. mallenexpensify commented on Aug 11, 2021

    @mallenexpensify
    Contributor

    @dylanexpensify update plz

  19. dylanexpensify commented on Aug 12, 2021

    @dylanexpensify
    Contributor

    On this today, sorry competing priorities kept me distracted.

  20. dylanexpensify commented on Aug 12, 2021

    @dylanexpensify
    Contributor

    Contributor: Paid
    Contract: Completed
    Upwork Post: Closed

  21. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EngineeringExternalAdded to denote the issue can be worked on by a contributorImprovementItem broken or needs improvement.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions