Skip to content

Commit

Permalink
fix maxage limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodebrute committed Sep 5, 2024
1 parent 5af9f2d commit 56fd8d3
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 56fd8d3

Please sign in to comment.