Skip to content

Commit

Permalink
Sende med integerValue til getNumberValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
frodehansen2 committed Nov 21, 2024
1 parent 6302b4a commit fa50f46
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const getNumberValidator =
(options: Options = {}): ValidationFunction<NumberValidationResult> =>
(value: any) => {
const { required, min, max, allowDecimals = true } = options;
const numberValue = getNumberFromNumberInputValue(value);
const numberValue = getNumberFromNumberInputValue(value, allowDecimals === false);

if (required) {
if (hasValue(value) === false || (typeof value === 'string' && value.trim().length === 0)) {
Expand Down

0 comments on commit fa50f46

Please sign in to comment.