Skip to content

Commit

Permalink
updated validation with number type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
alisher-epam committed Sep 27, 2024
1 parent c787856 commit bcc4a6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/validateRequired.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export function validateRequiredPositiveAmount(value) {
}

export function validatePositiveAmount(value) {
if (value !== '' || value === undefined || value === null) return undefined;
if (value === '' || value === undefined || value === null) return undefined;

return value > 0
return Number(value) > 0
? undefined
: <FormattedMessage id="stripes-acq-components.validation.shouldBePositiveAmount" />;
}
Expand Down

0 comments on commit bcc4a6c

Please sign in to comment.