@punks/backend-entity-manager 0.0.498 → 0.0.499
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/dist/cjs/index.js +2 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -41149,9 +41149,8 @@ const fieldRequiredValidator = (item, selector) => {
|
|
|
41149
41149
|
};
|
|
41150
41150
|
const fieldNumericValidator = (item, selector, params) => {
|
|
41151
41151
|
const value = selector(item);
|
|
41152
|
-
const isInvalid = value && !isNaN(value);
|
|
41153
41152
|
const errors = [];
|
|
41154
|
-
if (!!value &&
|
|
41153
|
+
if (!!value && isNaN(value)) {
|
|
41155
41154
|
errors.push({ errorCode: "notNumeric" });
|
|
41156
41155
|
}
|
|
41157
41156
|
if (!!params?.min && !!value && value < params.min) {
|
|
@@ -41167,7 +41166,7 @@ const fieldNumericValidator = (item, selector, params) => {
|
|
|
41167
41166
|
});
|
|
41168
41167
|
}
|
|
41169
41168
|
return {
|
|
41170
|
-
isValid:
|
|
41169
|
+
isValid: errors.length === 0,
|
|
41171
41170
|
validationErrors: errors,
|
|
41172
41171
|
};
|
|
41173
41172
|
};
|