UNPKG

nox-validation

Version:

validate dynamic schema

24 lines (22 loc) 594 B
const { validate, validateField, typeChecks } = require("./lib/validate"); const constants = require("./lib/constant"); const { getFieldsGroupBySchemaId, buildNestedStructure, getValue, setValue, getDefaultValues } = require("./lib/helpers"); module.exports = { validate, CONSTANTS: constants, helpers: { validateSingleField: validateField, validateType: typeChecks, fieldsMapping:getFieldsGroupBySchemaId, convertTree:buildNestedStructure, getValueByDynamicKey:getValue, setValueByDynamicKey:setValue, getTreeDefaultValues:getDefaultValues }, };