@punks/backend-entity-manager 0.0.496 → 0.0.498

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
@@ -41166,16 +41166,16 @@ const fieldNumericValidator = (item, selector, params) => {
41166
41166
  const value = selector(item);
41167
41167
  const isInvalid = value && !isNaN(value);
41168
41168
  const errors = [];
41169
- if (value && isNaN(value)) {
41169
+ if (!!value && !isNaN(value)) {
41170
41170
  errors.push({ errorCode: "notNumeric" });
41171
41171
  }
41172
- if (!!params.min && !!value && value < params.min) {
41172
+ if (!!params?.min && !!value && value < params.min) {
41173
41173
  errors.push({
41174
41174
  errorCode: "min",
41175
41175
  payload: { current: value, expected: params.min },
41176
41176
  });
41177
41177
  }
41178
- if (!!params.max && !!value && value > params.max) {
41178
+ if (!!params?.max && !!value && value > params.max) {
41179
41179
  errors.push({
41180
41180
  errorCode: "max",
41181
41181
  payload: { current: value, expected: params.max },