Skip to content

Commit

Permalink
Merge pull request #48610 from Nodebrute/wsrule
Browse files Browse the repository at this point in the history
fix max expense age limit
  • Loading branch information
chiragsalian authored Sep 10, 2024
2 parents a56b7c2 + 56fd8d3 commit 3b2df27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/workspace/rules/RulesMaxExpenseAgePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function RulesMaxExpenseAgePage({

const onChangeMaxExpenseAge = useCallback((newValue: string) => {
// replace all characters that are not spaces or digits
const validMaxExpenseAge = newValue.replace(/[^0-9]/g, '');
let validMaxExpenseAge = newValue.replace(/[^0-9]/g, '');
validMaxExpenseAge = validMaxExpenseAge.match(/(?:\d *){1,5}/)?.[0] ?? '';
setMaxExpenseAgeValue(validMaxExpenseAge);
}, []);

Expand Down Expand Up @@ -80,7 +81,6 @@ function RulesMaxExpenseAgePage({
value={maxExpenseAgeValue}
onChangeText={onChangeMaxExpenseAge}
ref={inputCallbackRef}
maxLength={CONST.FORM_CHARACTER_LIMIT}
/>
<Text style={[styles.mutedTextLabel, styles.mt2]}>{translate('workspace.rules.individualExpenseRules.maxExpenseAgeDescription')}</Text>
</View>
Expand Down

0 comments on commit 3b2df27

Please sign in to comment.