Skip to content

Commit

Permalink
fix use permittedDecimalSeparator in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Mar 28, 2024
1 parent 1c0ba35 commit 41f8408
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function BankAccountValidationForm({requiresTwoFactorAuth, reimbursementAccount,
const errors: FormInputErrors<typeof ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM> = {};
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];
Expand Down

0 comments on commit 41f8408

Please sign in to comment.