@punks/backend-entity-manager 0.0.494 → 0.0.495

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
@@ -41162,6 +41162,14 @@ const fieldRequiredValidator = (item, selector) => {
41162
41162
  validationErrors: value ? [] : [{ errorCode: "required" }],
41163
41163
  };
41164
41164
  };
41165
+ const fieldNumericValidator = (item, selector, params) => {
41166
+ const value = selector(item);
41167
+ const isInvalid = value && !isNaN(value);
41168
+ return {
41169
+ isValid: !isInvalid,
41170
+ validationErrors: isInvalid ? [{ errorCode: "notNumeric" }] : [],
41171
+ };
41172
+ };
41165
41173
  const fieldTextValidator = (item, selector, params) => {
41166
41174
  const value = selector(item);
41167
41175
  const values = Array.isArray(value)
@@ -45533,6 +45541,7 @@ exports.buildRolesGuard = buildRolesGuard;
45533
45541
  exports.createContainer = createContainer;
45534
45542
  exports.createExpressFileResponse = createExpressFileResponse;
45535
45543
  exports.fieldEmailValidator = fieldEmailValidator;
45544
+ exports.fieldNumericValidator = fieldNumericValidator;
45536
45545
  exports.fieldOptionValidator = fieldOptionValidator;
45537
45546
  exports.fieldOptionsValidator = fieldOptionsValidator;
45538
45547
  exports.fieldRequiredValidator = fieldRequiredValidator;