Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet - Account number field shows two error messages when it is empty #54692

Closed
5 of 8 tasks
mitarachim opened this issue Dec 31, 2024 · 13 comments
Closed
5 of 8 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Planning Changes still in the thought process

Comments

@mitarachim
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.80-1
Reproducible in staging?: Yes
Reproducible in production?: Unable to check
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Other

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Wallet.
  3. Click Add bank account.
  4. Select Malaysia as country if not selected.
  5. Without entering Account number, click Next.

Expected Result:

Account number field should only show one error message (This field is required) when it is empty.

Actual Result:

Account number field shows two error messages when it is empty -
This field is required.
Beneficiary Account Number is invalid. Value should be 1 to 50 characters long.

It should only show "Beneficiary Account Number is invalid. Value should be 1 to 50 characters long." after entering invalid account number.

The same issue happens with Bank account holder field.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6704690_1735685441395.20250101_064755.mp4

View all open jobs on GitHub

@mitarachim mitarachim added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlockerCash This issue or pull request should block deployment labels Dec 31, 2024
Copy link

melvin-bot bot commented Dec 31, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Dec 31, 2024

Triggered auto assignment to @deetergp (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Dec 31, 2024

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 31, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@NJ-2020
Copy link
Contributor

NJ-2020 commented Dec 31, 2024

Offending PR: #52322

function getValidationErrors(values: FormOnyxValues<typeof ONYXKEYS.FORMS.INTERNATIONAL_BANK_ACCOUNT_FORM>, fieldsMap: CorpayFieldsMap, translate: LocaleContextProps['translate']) {
const errors = {};
for (const fieldName in fieldsMap) {
if (!fieldName) {
// eslint-disable-next-line no-continue
continue;
}
if (fieldsMap[fieldName].isRequired && values[fieldName] === '') {
ErrorUtils.addErrorMessage(errors, fieldName, translate('common.error.fieldRequired'));
}

I think we need to add return statement here
if (fieldsMap[fieldName].isRequired && values[fieldName] === '') {
ErrorUtils.addErrorMessage(errors, fieldName, translate('common.error.fieldRequired'));
}

@jliexpensify
Copy link
Contributor

Assigning @DylanDylann and @MonilBhavsar as they worked on the offending PR.

@DylanDylann
Copy link
Contributor

@shubham1206agra Could you please fix this bug?

@MonilBhavsar MonilBhavsar added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 1, 2025
@MonilBhavsar
Copy link
Contributor

MonilBhavsar commented Jan 1, 2025

@joekaufmanexpensify curious for your thoughts. In this case, should we display, "required" error first and then if user's input is out of 1-50 range, then display the another error?

We can discuss here https://expensify.slack.com/archives/C01GTK53T8Q/p1735689150858259

@izarutskaya
Copy link

Hi @MonilBhavsar We have similar issue in Account Holder Name Field and Beneficiary bank branch name. Should we need create a separate issue or it is the same? Thank you

Screenshot 2025-01-02 at 7 43 40 in the morning

Screenshot 2025-01-02 at 7 44 38 in the morning

@shubham1206agra
Copy link
Contributor

@izarutskaya No

@shubham1206agra
Copy link
Contributor

No

@MonilBhavsar
Copy link
Contributor

No separate issue is required 👍

@MonilBhavsar
Copy link
Contributor

Closing as we're tracking in #54743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Planning Changes still in the thought process
Projects
None yet
Development

No branches or pull requests

8 participants