UNPKG

@palmares/schemas

Version:

This defines a default schema definition for validation of data, it abstract popular schema validation libraries like zod, yup, valibot and others"

15 lines (13 loc) 1.08 kB
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); // src/constants.ts var DEFAULT_NUMBER_MAX_EXCEPTION = /* @__PURE__ */ __name((max, inclusive) => `The number is greater than the allowed ${max}.${inclusive ? ` The value ${max} is accepted as well.` : ""}`, "DEFAULT_NUMBER_MAX_EXCEPTION"); var DEFAULT_NUMBER_MIN_EXCEPTION = /* @__PURE__ */ __name((min, inclusive) => `The number is less than the allowed ${min}.${inclusive ? ` The value ${min} is accepted as well.` : ""}`, "DEFAULT_NUMBER_MIN_EXCEPTION"); var DEFAULT_NUMBER_POSITIVE_EXCEPTION = /* @__PURE__ */ __name((allowZero) => `The number should be positive.${allowZero ? ` The value 0 is accepted as well.` : ""}`, "DEFAULT_NUMBER_POSITIVE_EXCEPTION"); var DEFAULT_NUMBER_INTEGER_EXCEPTION = /* @__PURE__ */ __name(() => `The number should be an integer.`, "DEFAULT_NUMBER_INTEGER_EXCEPTION"); export { DEFAULT_NUMBER_INTEGER_EXCEPTION, DEFAULT_NUMBER_MAX_EXCEPTION, DEFAULT_NUMBER_MIN_EXCEPTION, DEFAULT_NUMBER_POSITIVE_EXCEPTION };