From f71f4af3952e784614b6b8c3ca23dead4eb2d873 Mon Sep 17 00:00:00 2001 From: Srikar Parsi <48188732+srikarparsi@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:25:58 -0400 Subject: [PATCH] Merge pull request #21252 from Expensify/chirag-backAccount-fix Account number fix (cherry picked from commit 9e8a151b908447f3d79261ddb0f62d10c19b5c6e) --- src/pages/ReimbursementAccount/BankAccountManualStep.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/ReimbursementAccount/BankAccountManualStep.js b/src/pages/ReimbursementAccount/BankAccountManualStep.js index 5e495f70b27e..40b256ff12f2 100644 --- a/src/pages/ReimbursementAccount/BankAccountManualStep.js +++ b/src/pages/ReimbursementAccount/BankAccountManualStep.js @@ -42,13 +42,12 @@ class BankAccountManualStep extends React.Component { (!CONST.BANK_ACCOUNT.REGEX.US_ACCOUNT_NUMBER.test(values.accountNumber.trim()) && !CONST.BANK_ACCOUNT.REGEX.MASKED_US_ACCOUNT_NUMBER.test(values.accountNumber.trim())) ) { errorFields.accountNumber = 'bankAccount.error.accountNumber'; + } else if (values.accountNumber === routingNumber) { + errorFields.accountNumber = this.props.translate('bankAccount.error.routingAndAccountNumberCannotBeSame'); } if (!routingNumber || !CONST.BANK_ACCOUNT.REGEX.SWIFT_BIC.test(routingNumber) || !ValidationUtils.isValidRoutingNumber(routingNumber)) { errorFields.routingNumber = 'bankAccount.error.routingNumber'; } - if (values.accountNumber === routingNumber) { - errorFields.accountNumber = this.props.translate('bankAccount.error.routingAndAccountNumberCannotBeSame'); - } if (!values.acceptTerms) { errorFields.acceptTerms = 'common.error.acceptTerms'; }