Skip to content

Commit

Permalink
Merge pull request #21252 from Expensify/chirag-backAccount-fix
Browse files Browse the repository at this point in the history
Account number fix

(cherry picked from commit 9e8a151)
  • Loading branch information
srikarparsi authored and OSBotify committed Jun 21, 2023
1 parent d0e6f66 commit f71f4af
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/ReimbursementAccount/BankAccountManualStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit f71f4af

Please sign in to comment.