@dartech/arsenal-ui 1.3.53 → 1.3.55
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.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1847,7 +1847,7 @@ const ControlNumberInput = _a => {
|
|
1847
1847
|
hideErrorMessage = false,
|
1848
1848
|
onChange: customOnChange,
|
1849
1849
|
decimal = false,
|
1850
|
-
valueAsNumber
|
1850
|
+
valueAsNumber = true
|
1851
1851
|
} = _a,
|
1852
1852
|
textFieldProps = __rest(_a, ["control", "validate", "name", "label", "required", "defaultValue", "disabled", "hideErrorMessage", "onChange", "decimal", "valueAsNumber"]);
|
1853
1853
|
const {
|
@@ -1865,7 +1865,7 @@ const ControlNumberInput = _a => {
|
|
1865
1865
|
rules: {
|
1866
1866
|
required: required && 'Please, fill this field',
|
1867
1867
|
validate: val => {
|
1868
|
-
if (val === null) return true;
|
1868
|
+
if (val === null || val === 0) return true;
|
1869
1869
|
if (decimal && !floatsOnly.test(val) || /^-*0+$/.test(val)) {
|
1870
1870
|
return 'Not valid number';
|
1871
1871
|
} else if (!decimal && !digitsOnly.test(val)) {
|