@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 CHANGED
@@ -41164,9 +41164,8 @@ const fieldRequiredValidator = (item, selector) => {
41164
41164
  };
41165
41165
  const fieldNumericValidator = (item, selector, params) => {
41166
41166
  const value = selector(item);
41167
- const isInvalid = value && !isNaN(value);
41168
41167
  const errors = [];
41169
- if (!!value && !isNaN(value)) {
41168
+ if (!!value && isNaN(value)) {
41170
41169
  errors.push({ errorCode: "notNumeric" });
41171
41170
  }
41172
41171
  if (!!params?.min && !!value && value < params.min) {
@@ -41182,7 +41181,7 @@ const fieldNumericValidator = (item, selector, params) => {
41182
41181
  });
41183
41182
  }
41184
41183
  return {
41185
- isValid: !isInvalid,
41184
+ isValid: errors.length === 0,
41186
41185
  validationErrors: errors,
41187
41186
  };
41188
41187
  };