ps-toolkit-ui 1.6.98 → 1.6.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5986,7 +5986,7 @@
5986
5986
  }
5987
5987
  if (_this.inp.type === exports.InputType.Number || _this.inp.type === exports.InputType.Price) {
5988
5988
  var v = _this.inp.value.toString().replace(/,/g, '');
5989
- if (!/^\d+$/.test(v)) {
5989
+ if (!/^[-]?\d+$/.test(v)) {
5990
5990
  _this.inp.error = exports.InputError.Invalid;
5991
5991
  return false;
5992
5992
  }
@@ -6096,7 +6096,7 @@
6096
6096
  try {
6097
6097
  if (this.inp.value && this.inp.type === exports.InputType.Price) {
6098
6098
  var v = this.inp.value.toString().replace(/,/g, '');
6099
- if (/^\d+$/.test(v)) {
6099
+ if (/^[-]?\d+$/.test(v)) {
6100
6100
  return parseInt(v, 10).toLocaleString();
6101
6101
  }
6102
6102
  return v;