Skip to content

Commit

Permalink
Merge pull request #920 from nitreb/fix-number-regex-for-negative-num…
Browse files Browse the repository at this point in the history
…bers

Fix number regex for negative number
  • Loading branch information
garronej authored Jan 24, 2025
2 parents 3155255 + c65ccc4 commit a4915a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const NumberFormField = memo((props: Props) => {
throttleDelay: 500,
onChange,
parse: serializedValue => {
if (!/^[0-9.]+$/.test(serializedValue)) {
if (!/^-?[0-9.]+$/.test(serializedValue)) {
console.log("not a number");
return {
isValid: false,
Expand Down

0 comments on commit a4915a7

Please sign in to comment.