diff options
Diffstat (limited to 'common/src/main')
2 files changed, 2 insertions, 2 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/IntegerFieldController.java b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/IntegerFieldController.java index 5c15a2e..445e984 100644 --- a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/IntegerFieldController.java +++ b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/IntegerFieldController.java @@ -64,7 +64,7 @@ public class IntegerFieldController extends NumberFieldController<Integer> { @Override public boolean isInputValid(String input) { - return input.matches("\\d+|-|"); + return input.matches("(?:-?\\d+|)"); } /** diff --git a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/LongFieldController.java b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/LongFieldController.java index b36b0f3..fe2ef2c 100644 --- a/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/LongFieldController.java +++ b/common/src/main/java/dev/isxander/yacl3/gui/controllers/string/number/LongFieldController.java @@ -64,7 +64,7 @@ public class LongFieldController extends NumberFieldController<Long> { @Override public boolean isInputValid(String input) { - return input.matches("\\d+|-|"); + return input.matches("(?:-?\\d+|)"); } /** |