From 41f840874863253bebc21dcbedd9ad1e7d474e30 Mon Sep 17 00:00:00 2001 From: tienifr Date: Thu, 28 Mar 2024 11:35:14 +0700 Subject: [PATCH] fix use permittedDecimalSeparator in regex --- .../ConnectBankAccount/components/BankAccountValidationForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx b/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx index 5f07ae474eac..a83e18d119c9 100644 --- a/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx +++ b/src/pages/ReimbursementAccount/ConnectBankAccount/components/BankAccountValidationForm.tsx @@ -65,7 +65,7 @@ function BankAccountValidationForm({requiresTwoFactorAuth, reimbursementAccount, const errors: FormInputErrors = {}; const amountValues = getAmountValues(values); const outputCurrency = policy?.outputCurrency ?? CONST.CURRENCY.USD; - const amountRegex = RegExp(String.raw`^-?\d{0,8}([${getPermittedDecimalSeparator(decimalSeparator)}]\d{0,${CurrencyUtils.getCurrencyDecimals(outputCurrency)}})?$`, 'i'); + const amountRegex = RegExp(String.raw`^-?\d{0,8}([${permittedDecimalSeparator}]\d{0,${CurrencyUtils.getCurrencyDecimals(outputCurrency)}})?$`, 'i'); Object.keys(amountValues).forEach((key) => { const value = amountValues[key as keyof AmountValues];