diff --git a/src/CONST.js b/src/CONST.js index 9e9932cefcb0..02e5a9455b7a 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -28,6 +28,7 @@ const CONST = { MISSING_INCORPORATION_STATE: '402 Missing incorporationState in additionalData', MISSING_INCORPORATION_TYPE: '402 Missing incorporationType in additionalData', MAX_VALIDATION_ATTEMPTS_REACHED: 'Validation for this bank account has been disabled due to too many incorrect attempts. Please contact us.', + INCORRECT_VALIDATION_AMOUNTS: 'The validate code you entered is incorrect, please try again.', }, STEP: { // In the order they appear in the VBA flow diff --git a/src/languages/en.js b/src/languages/en.js index a37511d00a16..d7ad54eef222 100755 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -414,6 +414,7 @@ export default { noDefaultDepositAccountOrDebitCardAvailable: 'Please add a default deposit bank account or debit card', fixTheErrors: 'fix the errors', inTheFormBeforeContinuing: 'in the form before continuing', + validationAmounts: 'The validation amounts you entered are incorrect. Please double-check your bank statement and try again.', }, }, addPersonalBankAccountPage: { diff --git a/src/languages/es.js b/src/languages/es.js index 6a14382bad6f..99b3b7ceb785 100644 --- a/src/languages/es.js +++ b/src/languages/es.js @@ -414,6 +414,7 @@ export default { noDefaultDepositAccountOrDebitCardAvailable: 'Por favor agrega una cuenta bancaria para depósitos o una tarjeta de débito', fixTheErrors: 'corrige los errores', inTheFormBeforeContinuing: 'en el formulario antes de continuar', + validationAmounts: 'Los montos de validación que ingresaste son incorrectos. Verifica tu cuenta de banco e intenta de nuevo.', }, }, addPersonalBankAccountPage: { diff --git a/src/libs/actions/BankAccounts.js b/src/libs/actions/BankAccounts.js index 37e32c27ba23..a0b0ddecf2dc 100644 --- a/src/libs/actions/BankAccounts.js +++ b/src/libs/actions/BankAccounts.js @@ -580,7 +580,14 @@ function validateBankAccount(bankAccountID, validateCode) { return; } - // We are generically showing any backend errors that might pop up in the validate step + // If the validation amounts entered were incorrect, show specific error + if (response.message === CONST.BANK_ACCOUNT.ERROR.INCORRECT_VALIDATION_AMOUNTS) { + showBankAccountErrorModal(translateLocal('bankAccount.error.validationAmounts')); + Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: false}); + return; + } + + // We are generically showing any other backend errors that might pop up in the validate step showBankAccountErrorModal(response.message); Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: false}); });