Skip to content

Commit

Permalink
refactor: semantically simpler validation
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Oct 10, 2024
1 parent 1dc37ad commit da8d301
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor.planx.uk/src/@planx/components/NumberInput/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const numberInputValidationSchema = (input: NumberInput) =>
if (!value) {
return false;
}
if (value.includes(".")) {
if (!Number.isInteger(Number(value))) {
return false;
}
return true;
Expand Down

0 comments on commit da8d301

Please sign in to comment.