@oxog/vld 2.0.3 → 2.2.5
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/CHANGELOG.md +120 -1
- package/README.md +1296 -1171
- package/dist/chunks/errors-core-Cqi4-9ew.js +1 -0
- package/dist/chunks/index-CkbfQQ4n.js +1 -0
- package/dist/chunks/index-yjpbvFgw.js +1 -0
- package/dist/chunks/ip-validation-g5LWgy9t.js +1 -0
- package/dist/chunks/security-Dy24T8N7.js +1 -0
- package/dist/cjs/chunks/errors-core-DKPohm9I.cjs +1 -0
- package/dist/cjs/chunks/index-BEV9nG0N.cjs +1 -0
- package/dist/cjs/chunks/index-ZjHAxYdA.cjs +1 -0
- package/dist/cjs/chunks/ip-validation-BZqPamPC.cjs +1 -0
- package/dist/cjs/chunks/security-aXZVI7qW.cjs +1 -0
- package/dist/cjs/cli/bin.cjs +2 -0
- package/dist/cjs/cli/index.cjs +1 -0
- package/dist/cjs/codecs/index.cjs +1 -0
- package/dist/cjs/coercion/index.cjs +1 -0
- package/dist/cjs/compat/emitter.cjs +1 -0
- package/dist/cjs/compat/result.cjs +1 -0
- package/dist/cjs/errors.cjs +1 -387
- package/dist/cjs/index.cjs +1 -10759
- package/dist/cjs/kernel.cjs +1 -0
- package/dist/cjs/locales/af.cjs +1 -0
- package/dist/cjs/locales/ar.cjs +1 -0
- package/dist/cjs/locales/bn.cjs +1 -0
- package/dist/cjs/locales/da.cjs +1 -0
- package/dist/cjs/locales/de.cjs +1 -0
- package/dist/cjs/locales/en.cjs +1 -0
- package/dist/cjs/locales/es-MX.cjs +1 -0
- package/dist/cjs/locales/es.cjs +1 -0
- package/dist/cjs/locales/fi.cjs +1 -0
- package/dist/cjs/locales/fr.cjs +1 -0
- package/dist/cjs/locales/hi.cjs +1 -0
- package/dist/cjs/locales/id.cjs +1 -0
- package/dist/cjs/locales/index.cjs +1 -2877
- package/dist/cjs/locales/it.cjs +1 -0
- package/dist/cjs/locales/ja.cjs +1 -0
- package/dist/cjs/locales/ko.cjs +1 -0
- package/dist/cjs/locales/lazy.cjs +1 -3169
- package/dist/cjs/locales/nl.cjs +1 -0
- package/dist/cjs/locales/no.cjs +1 -0
- package/dist/cjs/locales/pl.cjs +1 -0
- package/dist/cjs/locales/pt-BR.cjs +1 -0
- package/dist/cjs/locales/pt.cjs +1 -0
- package/dist/cjs/locales/ru.cjs +1 -0
- package/dist/cjs/locales/runtime.cjs +1 -0
- package/dist/cjs/locales/sv.cjs +1 -0
- package/dist/cjs/locales/sw.cjs +1 -0
- package/dist/cjs/locales/th.cjs +1 -0
- package/dist/cjs/locales/tr.cjs +1 -0
- package/dist/cjs/locales/vi.cjs +1 -0
- package/dist/cjs/locales/zh.cjs +1 -0
- package/dist/cjs/mini.cjs +1 -7474
- package/dist/cjs/pigment.cjs +1 -0
- package/dist/cjs/plugins/index.cjs +1 -0
- package/dist/cjs/registry.cjs +1 -0
- package/dist/cjs/v3/index.cjs +1 -0
- package/dist/cjs/v4/core/index.cjs +1 -0
- package/dist/cjs/v4/index.cjs +1 -0
- package/dist/cjs/v4/locales/index.cjs +1 -0
- package/dist/cjs/v4/mini/index.cjs +1 -0
- package/dist/cjs/v4-mini/index.cjs +1 -0
- package/dist/cjs/validators/any.cjs +1 -0
- package/dist/cjs/validators/array.cjs +1 -0
- package/dist/cjs/validators/base.cjs +1 -0
- package/dist/cjs/validators/base64.cjs +1 -0
- package/dist/cjs/validators/bigint.cjs +1 -0
- package/dist/cjs/validators/boolean.cjs +1 -0
- package/dist/cjs/validators/codec.cjs +1 -0
- package/dist/cjs/validators/custom.cjs +1 -0
- package/dist/cjs/validators/date.cjs +1 -0
- package/dist/cjs/validators/discriminated-union.cjs +1 -0
- package/dist/cjs/validators/enum.cjs +1 -0
- package/dist/cjs/validators/file.cjs +1 -0
- package/dist/cjs/validators/function.cjs +1 -0
- package/dist/cjs/validators/hex.cjs +1 -0
- package/dist/cjs/validators/index.cjs +1 -0
- package/dist/cjs/validators/intersection.cjs +1 -0
- package/dist/cjs/validators/json.cjs +1 -0
- package/dist/cjs/validators/lazy.cjs +1 -0
- package/dist/cjs/validators/literal.cjs +1 -0
- package/dist/cjs/validators/map.cjs +1 -0
- package/dist/cjs/validators/nan.cjs +1 -0
- package/dist/cjs/validators/never.cjs +1 -0
- package/dist/cjs/validators/null.cjs +1 -0
- package/dist/cjs/validators/number.cjs +1 -0
- package/dist/cjs/validators/object.cjs +1 -0
- package/dist/cjs/validators/promise.cjs +1 -0
- package/dist/cjs/validators/record.cjs +1 -0
- package/dist/cjs/validators/set.cjs +1 -0
- package/dist/cjs/validators/string-bool.cjs +1 -0
- package/dist/cjs/validators/string-formats.cjs +1 -0
- package/dist/cjs/validators/string.cjs +1 -0
- package/dist/cjs/validators/symbol.cjs +1 -0
- package/dist/cjs/validators/template-literal.cjs +1 -0
- package/dist/cjs/validators/tuple.cjs +1 -0
- package/dist/cjs/validators/uint8array.cjs +1 -0
- package/dist/cjs/validators/undefined.cjs +1 -0
- package/dist/cjs/validators/union.cjs +1 -0
- package/dist/cjs/validators/unknown.cjs +1 -0
- package/dist/cjs/validators/void.cjs +1 -0
- package/dist/cjs/validators/xor.cjs +1 -0
- package/dist/cli/bin.d.ts +0 -1
- package/dist/cli/bin.js +2 -0
- package/dist/cli/commands/benchmark.d.ts +1 -2
- package/dist/cli/commands/validate.d.ts +1 -2
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +1 -0
- package/dist/codecs/index.d.ts +21 -4
- package/dist/codecs/index.js +1 -4
- package/dist/coercion/bigint.d.ts +2 -3
- package/dist/coercion/boolean.d.ts +3 -3
- package/dist/coercion/date.d.ts +3 -3
- package/dist/coercion/index.d.ts +5 -6
- package/dist/coercion/index.js +1 -111
- package/dist/coercion/number.d.ts +2 -3
- package/dist/coercion/string.d.ts +2 -3
- package/dist/compat/emitter.d.ts +0 -1
- package/dist/compat/emitter.js +1 -181
- package/dist/compat/index.d.ts +4 -5
- package/dist/compat/result.d.ts +1 -2
- package/dist/compat/result.js +1 -171
- package/dist/errors-core.d.ts +58 -0
- package/dist/errors.d.ts +4 -54
- package/dist/errors.js +1 -235
- package/dist/events.d.ts +3 -4
- package/dist/index.d.ts +1093 -851
- package/dist/index.js +1 -855
- package/dist/kernel.d.ts +2 -3
- package/dist/kernel.js +1 -405
- package/dist/locales/af.d.ts +1 -2
- package/dist/locales/af.js +1 -107
- package/dist/locales/ar.d.ts +1 -2
- package/dist/locales/ar.js +1 -107
- package/dist/locales/bn.d.ts +1 -2
- package/dist/locales/bn.js +1 -107
- package/dist/locales/da.d.ts +1 -2
- package/dist/locales/da.js +1 -107
- package/dist/locales/de.d.ts +1 -2
- package/dist/locales/de.js +1 -107
- package/dist/locales/en.d.ts +1 -2
- package/dist/locales/en.js +1 -107
- package/dist/locales/es-MX.d.ts +1 -2
- package/dist/locales/es-MX.js +1 -106
- package/dist/locales/es.d.ts +1 -2
- package/dist/locales/es.js +1 -95
- package/dist/locales/fi.d.ts +1 -2
- package/dist/locales/fi.js +1 -107
- package/dist/locales/fr.d.ts +1 -2
- package/dist/locales/fr.js +1 -95
- package/dist/locales/hi.d.ts +1 -2
- package/dist/locales/hi.js +1 -107
- package/dist/locales/id.d.ts +1 -2
- package/dist/locales/id.js +1 -107
- package/dist/locales/index.d.ts +10 -15
- package/dist/locales/index.js +1 -3
- package/dist/locales/it.d.ts +1 -2
- package/dist/locales/it.js +1 -107
- package/dist/locales/ja.d.ts +1 -2
- package/dist/locales/ja.js +1 -107
- package/dist/locales/ko.d.ts +1 -2
- package/dist/locales/ko.js +1 -107
- package/dist/locales/lazy.d.ts +4 -26
- package/dist/locales/lazy.js +1 -220
- package/dist/locales/nl.d.ts +1 -2
- package/dist/locales/nl.js +1 -107
- package/dist/locales/no.d.ts +1 -2
- package/dist/locales/no.js +1 -107
- package/dist/locales/pl.d.ts +1 -2
- package/dist/locales/pl.js +1 -107
- package/dist/locales/pt-BR.d.ts +1 -2
- package/dist/locales/pt-BR.js +1 -107
- package/dist/locales/pt.d.ts +1 -2
- package/dist/locales/pt.js +1 -107
- package/dist/locales/ru.d.ts +1 -2
- package/dist/locales/ru.js +1 -107
- package/dist/locales/runtime.d.ts +10 -0
- package/dist/locales/runtime.js +1 -0
- package/dist/locales/sv.d.ts +1 -2
- package/dist/locales/sv.js +1 -107
- package/dist/locales/sw.d.ts +1 -2
- package/dist/locales/sw.js +1 -107
- package/dist/locales/th.d.ts +1 -2
- package/dist/locales/th.js +1 -107
- package/dist/locales/tr.d.ts +1 -2
- package/dist/locales/tr.js +1 -107
- package/dist/locales/types.d.ts +0 -1
- package/dist/locales/vi.d.ts +1 -2
- package/dist/locales/vi.js +1 -107
- package/dist/locales/zh.d.ts +1 -2
- package/dist/locales/zh.js +1 -107
- package/dist/logger.d.ts +0 -1
- package/dist/mini.d.ts +67 -68
- package/dist/mini.js +1 -132
- package/dist/pigment.d.ts +0 -1
- package/dist/pigment.js +1 -178
- package/dist/plugins/index.d.ts +2 -3
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/types.d.ts +4 -5
- package/dist/registry.d.ts +23 -0
- package/dist/registry.js +1 -0
- package/dist/utils/codec-utils.d.ts +0 -1
- package/dist/utils/deep-merge.d.ts +0 -1
- package/dist/utils/ip-validation.d.ts +0 -1
- package/dist/utils/json-schema.d.ts +26 -7
- package/dist/utils/security.d.ts +2 -6
- package/dist/v3/index.d.ts +2 -0
- package/dist/v3/index.js +1 -0
- package/dist/v4/core/index.d.ts +272 -0
- package/dist/v4/core/index.js +1 -0
- package/dist/v4/index.d.ts +4 -0
- package/dist/v4/index.js +1 -0
- package/dist/v4/locales/index.d.ts +57 -0
- package/dist/v4/locales/index.js +1 -0
- package/dist/v4/mini/index.d.ts +2 -0
- package/dist/v4/mini/index.js +1 -0
- package/dist/v4-mini/index.d.ts +22 -0
- package/dist/v4-mini/index.js +1 -0
- package/dist/validators/any.d.ts +7 -2
- package/dist/validators/any.js +1 -0
- package/dist/validators/array.d.ts +16 -2
- package/dist/validators/array.js +1 -0
- package/dist/validators/base.d.ts +213 -14
- package/dist/validators/base.js +1 -0
- package/dist/validators/base64.d.ts +1 -2
- package/dist/validators/base64.js +1 -0
- package/dist/validators/bigint.d.ts +21 -3
- package/dist/validators/bigint.js +1 -0
- package/dist/validators/boolean.d.ts +13 -4
- package/dist/validators/boolean.js +1 -0
- package/dist/validators/codec.d.ts +9 -2
- package/dist/validators/codec.js +1 -0
- package/dist/validators/custom.d.ts +15 -2
- package/dist/validators/custom.js +1 -0
- package/dist/validators/date.d.ts +19 -3
- package/dist/validators/date.js +1 -0
- package/dist/validators/discriminated-union.d.ts +6 -5
- package/dist/validators/discriminated-union.js +1 -0
- package/dist/validators/enum.d.ts +10 -7
- package/dist/validators/enum.js +1 -0
- package/dist/validators/file.d.ts +7 -2
- package/dist/validators/file.js +1 -0
- package/dist/validators/function.d.ts +11 -5
- package/dist/validators/function.js +1 -0
- package/dist/validators/hex.d.ts +1 -2
- package/dist/validators/hex.js +1 -0
- package/dist/validators/index.d.ts +38 -39
- package/dist/validators/index.js +1 -515
- package/dist/validators/intersection.d.ts +1 -2
- package/dist/validators/intersection.js +1 -0
- package/dist/validators/json.d.ts +1 -2
- package/dist/validators/json.js +1 -0
- package/dist/validators/lazy.d.ts +5 -9
- package/dist/validators/lazy.js +1 -0
- package/dist/validators/literal.d.ts +9 -5
- package/dist/validators/literal.js +1 -0
- package/dist/validators/map.d.ts +15 -2
- package/dist/validators/map.js +1 -0
- package/dist/validators/nan.d.ts +2 -3
- package/dist/validators/nan.js +1 -0
- package/dist/validators/never.d.ts +1 -2
- package/dist/validators/never.js +1 -0
- package/dist/validators/null.d.ts +3 -3
- package/dist/validators/null.js +1 -0
- package/dist/validators/number.d.ts +75 -27
- package/dist/validators/number.js +1 -0
- package/dist/validators/object.d.ts +42 -11
- package/dist/validators/object.js +1 -0
- package/dist/validators/promise.d.ts +15 -10
- package/dist/validators/promise.js +1 -0
- package/dist/validators/record.d.ts +21 -9
- package/dist/validators/record.js +1 -0
- package/dist/validators/set.d.ts +11 -2
- package/dist/validators/set.js +1 -0
- package/dist/validators/string-bool.d.ts +7 -10
- package/dist/validators/string-bool.js +1 -0
- package/dist/validators/string-formats.d.ts +64 -65
- package/dist/validators/string-formats.js +1 -0
- package/dist/validators/string.d.ts +84 -26
- package/dist/validators/string.js +1 -0
- package/dist/validators/symbol.d.ts +8 -3
- package/dist/validators/symbol.js +1 -0
- package/dist/validators/template-literal.d.ts +1 -2
- package/dist/validators/template-literal.js +1 -0
- package/dist/validators/tuple.d.ts +29 -12
- package/dist/validators/tuple.js +1 -0
- package/dist/validators/uint8array.d.ts +3 -4
- package/dist/validators/uint8array.js +1 -0
- package/dist/validators/undefined.d.ts +3 -3
- package/dist/validators/undefined.js +1 -0
- package/dist/validators/union.d.ts +7 -4
- package/dist/validators/union.js +1 -0
- package/dist/validators/unknown.d.ts +7 -2
- package/dist/validators/unknown.js +1 -0
- package/dist/validators/void.d.ts +3 -2
- package/dist/validators/void.js +1 -0
- package/dist/validators/xor.d.ts +4 -5
- package/dist/validators/xor.js +1 -0
- package/package.json +239 -154
- package/dist/chunks/bigint-CRS0QVsy.js +0 -1854
- package/dist/chunks/bigint-CRS0QVsy.js.map +0 -1
- package/dist/chunks/date-50JV_Mfj.js +0 -506
- package/dist/chunks/date-50JV_Mfj.js.map +0 -1
- package/dist/chunks/index-DO8CFMxD.js +0 -894
- package/dist/chunks/index-DO8CFMxD.js.map +0 -1
- package/dist/chunks/json-Cp4WO0M9.js +0 -2021
- package/dist/chunks/json-Cp4WO0M9.js.map +0 -1
- package/dist/chunks/unknown-Dhzri_T-.js +0 -28
- package/dist/chunks/unknown-Dhzri_T-.js.map +0 -1
- package/dist/cjs/errors.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/locales/index.cjs.map +0 -1
- package/dist/cjs/locales/lazy.cjs.map +0 -1
- package/dist/cjs/mini.cjs.map +0 -1
- package/dist/cli/bin.d.ts.map +0 -1
- package/dist/cli/commands/benchmark.d.ts.map +0 -1
- package/dist/cli/commands/validate.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/codecs/index.d.ts.map +0 -1
- package/dist/codecs/index.js.map +0 -1
- package/dist/coercion/bigint.d.ts.map +0 -1
- package/dist/coercion/boolean.d.ts.map +0 -1
- package/dist/coercion/date.d.ts.map +0 -1
- package/dist/coercion/index.d.ts.map +0 -1
- package/dist/coercion/index.js.map +0 -1
- package/dist/coercion/number.d.ts.map +0 -1
- package/dist/coercion/string.d.ts.map +0 -1
- package/dist/compat/emitter.d.ts.map +0 -1
- package/dist/compat/emitter.js.map +0 -1
- package/dist/compat/index.d.ts.map +0 -1
- package/dist/compat/result.d.ts.map +0 -1
- package/dist/compat/result.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/events.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/locales/af.d.ts.map +0 -1
- package/dist/locales/af.js.map +0 -1
- package/dist/locales/ar.d.ts.map +0 -1
- package/dist/locales/ar.js.map +0 -1
- package/dist/locales/backup-en.d.ts +0 -3
- package/dist/locales/backup-en.d.ts.map +0 -1
- package/dist/locales/bn.d.ts.map +0 -1
- package/dist/locales/bn.js.map +0 -1
- package/dist/locales/da.d.ts.map +0 -1
- package/dist/locales/da.js.map +0 -1
- package/dist/locales/de.d.ts.map +0 -1
- package/dist/locales/de.js.map +0 -1
- package/dist/locales/en.d.ts.map +0 -1
- package/dist/locales/en.js.map +0 -1
- package/dist/locales/es-MX.d.ts.map +0 -1
- package/dist/locales/es-MX.js.map +0 -1
- package/dist/locales/es.d.ts.map +0 -1
- package/dist/locales/es.js.map +0 -1
- package/dist/locales/fi.d.ts.map +0 -1
- package/dist/locales/fi.js.map +0 -1
- package/dist/locales/fr.d.ts.map +0 -1
- package/dist/locales/fr.js.map +0 -1
- package/dist/locales/hi.d.ts.map +0 -1
- package/dist/locales/hi.js.map +0 -1
- package/dist/locales/id.d.ts.map +0 -1
- package/dist/locales/id.js.map +0 -1
- package/dist/locales/index.d.ts.map +0 -1
- package/dist/locales/index.js.map +0 -1
- package/dist/locales/it.d.ts.map +0 -1
- package/dist/locales/it.js.map +0 -1
- package/dist/locales/ja.d.ts.map +0 -1
- package/dist/locales/ja.js.map +0 -1
- package/dist/locales/ko.d.ts.map +0 -1
- package/dist/locales/ko.js.map +0 -1
- package/dist/locales/lazy.d.ts.map +0 -1
- package/dist/locales/lazy.js.map +0 -1
- package/dist/locales/nl.d.ts.map +0 -1
- package/dist/locales/nl.js.map +0 -1
- package/dist/locales/no.d.ts.map +0 -1
- package/dist/locales/no.js.map +0 -1
- package/dist/locales/pl.d.ts.map +0 -1
- package/dist/locales/pl.js.map +0 -1
- package/dist/locales/pt-BR.d.ts.map +0 -1
- package/dist/locales/pt-BR.js.map +0 -1
- package/dist/locales/pt.d.ts.map +0 -1
- package/dist/locales/pt.js.map +0 -1
- package/dist/locales/ru.d.ts.map +0 -1
- package/dist/locales/ru.js.map +0 -1
- package/dist/locales/sv.d.ts.map +0 -1
- package/dist/locales/sv.js.map +0 -1
- package/dist/locales/sw.d.ts.map +0 -1
- package/dist/locales/sw.js.map +0 -1
- package/dist/locales/th.d.ts.map +0 -1
- package/dist/locales/th.js.map +0 -1
- package/dist/locales/tr.d.ts.map +0 -1
- package/dist/locales/tr.js.map +0 -1
- package/dist/locales/types.d.ts.map +0 -1
- package/dist/locales/vi.d.ts.map +0 -1
- package/dist/locales/vi.js.map +0 -1
- package/dist/locales/zh.d.ts.map +0 -1
- package/dist/locales/zh.js.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/mini.d.ts.map +0 -1
- package/dist/mini.js.map +0 -1
- package/dist/pigment.d.ts.map +0 -1
- package/dist/pigment.js.map +0 -1
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/utils/codec-utils.d.ts.map +0 -1
- package/dist/utils/deep-merge.d.ts.map +0 -1
- package/dist/utils/ip-validation.d.ts.map +0 -1
- package/dist/utils/json-schema.d.ts.map +0 -1
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/validators/any.d.ts.map +0 -1
- package/dist/validators/array.d.ts.map +0 -1
- package/dist/validators/base.d.ts.map +0 -1
- package/dist/validators/base64.d.ts.map +0 -1
- package/dist/validators/bigint.d.ts.map +0 -1
- package/dist/validators/boolean.d.ts.map +0 -1
- package/dist/validators/codec.d.ts.map +0 -1
- package/dist/validators/custom.d.ts.map +0 -1
- package/dist/validators/date.d.ts.map +0 -1
- package/dist/validators/discriminated-union.d.ts.map +0 -1
- package/dist/validators/enum.d.ts.map +0 -1
- package/dist/validators/file.d.ts.map +0 -1
- package/dist/validators/function.d.ts.map +0 -1
- package/dist/validators/hex.d.ts.map +0 -1
- package/dist/validators/index.d.ts.map +0 -1
- package/dist/validators/index.js.map +0 -1
- package/dist/validators/intersection.d.ts.map +0 -1
- package/dist/validators/json.d.ts.map +0 -1
- package/dist/validators/lazy.d.ts.map +0 -1
- package/dist/validators/literal.d.ts.map +0 -1
- package/dist/validators/map.d.ts.map +0 -1
- package/dist/validators/nan.d.ts.map +0 -1
- package/dist/validators/never.d.ts.map +0 -1
- package/dist/validators/null.d.ts.map +0 -1
- package/dist/validators/number.d.ts.map +0 -1
- package/dist/validators/object.d.ts.map +0 -1
- package/dist/validators/promise.d.ts.map +0 -1
- package/dist/validators/record.d.ts.map +0 -1
- package/dist/validators/set.d.ts.map +0 -1
- package/dist/validators/string-bool.d.ts.map +0 -1
- package/dist/validators/string-formats.d.ts.map +0 -1
- package/dist/validators/string.d.ts.map +0 -1
- package/dist/validators/symbol.d.ts.map +0 -1
- package/dist/validators/template-literal.d.ts.map +0 -1
- package/dist/validators/tuple.d.ts.map +0 -1
- package/dist/validators/uint8array.d.ts.map +0 -1
- package/dist/validators/undefined.d.ts.map +0 -1
- package/dist/validators/union.d.ts.map +0 -1
- package/dist/validators/unknown.d.ts.map +0 -1
- package/dist/validators/void.d.ts.map +0 -1
- package/dist/validators/xor.d.ts.map +0 -1
package/dist/locales/tr.js
CHANGED
|
@@ -1,107 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
// String validation messages
|
|
3
|
-
invalidString: 'Geçersiz metin',
|
|
4
|
-
stringMin: (min) => `Metin en az ${min} karakter olmalı`,
|
|
5
|
-
stringMax: (max) => `Metin en fazla ${max} karakter olmalı`,
|
|
6
|
-
stringLength: (length) => `Metin tam olarak ${length} karakter olmalı`,
|
|
7
|
-
stringEmail: 'Geçersiz e-posta adresi',
|
|
8
|
-
stringUrl: 'Geçersiz URL',
|
|
9
|
-
stringUuid: 'Geçersiz UUID',
|
|
10
|
-
stringRegex: 'Geçersiz format',
|
|
11
|
-
stringStartsWith: (prefix) => `Metin "${prefix}" ile başlamalı`,
|
|
12
|
-
stringEndsWith: (suffix) => `Metin "${suffix}" ile bitmeli`,
|
|
13
|
-
stringIncludes: (substring) => `Metin "${substring}" içermeli`,
|
|
14
|
-
stringIp: 'Geçersiz IP adresi',
|
|
15
|
-
stringIpv4: 'Geçersiz IPv4 adresi',
|
|
16
|
-
stringIpv6: 'Geçersiz IPv6 adresi',
|
|
17
|
-
stringEmpty: 'Metin boş olmamalı',
|
|
18
|
-
// Number validation messages
|
|
19
|
-
invalidNumber: 'Geçersiz sayı',
|
|
20
|
-
numberMin: (min) => `Sayı en az ${min} olmalı`,
|
|
21
|
-
numberMax: (max) => `Sayı en fazla ${max} olmalı`,
|
|
22
|
-
numberInt: 'Sayı tam sayı olmalı',
|
|
23
|
-
numberPositive: 'Sayı pozitif olmalı',
|
|
24
|
-
numberNegative: 'Sayı negatif olmalı',
|
|
25
|
-
numberNonnegative: 'Sayı negatif olmamalı',
|
|
26
|
-
numberNonpositive: 'Sayı pozitif olmamalı',
|
|
27
|
-
numberFinite: 'Sayı sonlu olmalı',
|
|
28
|
-
numberSafe: 'Sayı güvenli tam sayı olmalı',
|
|
29
|
-
numberMultipleOf: (value) => `Sayı ${value}'nin katı olmalı`,
|
|
30
|
-
// Boolean validation messages
|
|
31
|
-
invalidBoolean: 'Geçersiz boolean',
|
|
32
|
-
// Date validation messages
|
|
33
|
-
invalidDate: 'Geçersiz tarih',
|
|
34
|
-
dateMin: (date) => `Tarih ${date.toISOString()} sonrasında olmalı`,
|
|
35
|
-
dateMax: (date) => `Tarih ${date.toISOString()} öncesinde olmalı`,
|
|
36
|
-
// Object validation messages
|
|
37
|
-
invalidObject: 'Geçersiz nesne',
|
|
38
|
-
unexpectedKeys: (keys) => `Beklenmeyen anahtarlar: ${keys.join(', ')}`,
|
|
39
|
-
// Array validation messages
|
|
40
|
-
invalidArray: 'Geçersiz dizi',
|
|
41
|
-
arrayMin: (min) => `Dizi en az ${min} eleman içermeli`,
|
|
42
|
-
arrayMax: (max) => `Dizi en fazla ${max} eleman içermeli`,
|
|
43
|
-
arrayLength: (length) => `Dizi tam olarak ${length} eleman içermeli`,
|
|
44
|
-
arrayEmpty: 'Dizi boş olmamalı',
|
|
45
|
-
arrayItem: (index, error) => `${index} indeksindeki eleman geçersiz: ${error}`,
|
|
46
|
-
// Object field validation
|
|
47
|
-
objectField: (field, error) => `"${field}" alanı geçersiz: ${error}`,
|
|
48
|
-
// Union validation messages
|
|
49
|
-
unionNoMatch: (errors) => `Hiçbir union üyesi eşleşmedi: ${errors.join(', ')}`,
|
|
50
|
-
// Intersection validation messages
|
|
51
|
-
intersectionError: (error) => `Intersection doğrulaması başarısız: ${error}`,
|
|
52
|
-
// Literal validation messages
|
|
53
|
-
literalExpected: (expected, received) => `${expected} beklendi, ${received} alındı`,
|
|
54
|
-
// Enum validation messages
|
|
55
|
-
enumExpected: (values, received) => `[${values.join(', ')}] değerlerinden biri beklendi, ${received} alındı`,
|
|
56
|
-
// Special type validation messages
|
|
57
|
-
expectedUndefined: 'Undefined beklendi',
|
|
58
|
-
neverType: 'Never tipi parse edilemez',
|
|
59
|
-
// New advanced type validation messages
|
|
60
|
-
invalidBigint: 'Geçersiz bigint',
|
|
61
|
-
invalidSymbol: 'Geçersiz symbol',
|
|
62
|
-
invalidTuple: 'Geçersiz tuple',
|
|
63
|
-
tupleLength: (expected, received) => `Tuple tam olarak ${expected} elemana sahip olmalı, ${received} aldı`,
|
|
64
|
-
invalidRecord: 'Geçersiz record',
|
|
65
|
-
invalidSet: 'Geçersiz set',
|
|
66
|
-
invalidMap: 'Geçersiz map',
|
|
67
|
-
// Transformation and refinement messages
|
|
68
|
-
transformError: (error) => `Dönüştürme başarısız: ${error}`,
|
|
69
|
-
refinementError: (error) => `Doğrulama başarısız: ${error}`,
|
|
70
|
-
customValidationError: (error) => `Özel doğrulama başarısız: ${error}`,
|
|
71
|
-
// Coercion messages
|
|
72
|
-
coercionFailed: (type, value) => `${JSON.stringify(value)} değeri ${type} tipine dönüştürülemez`,
|
|
73
|
-
// Codec messages
|
|
74
|
-
codecDecodeFailed: 'Failed to decode value',
|
|
75
|
-
codecEncodeFailed: 'Failed to encode value',
|
|
76
|
-
codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
|
|
77
|
-
// Base64/Hex messages
|
|
78
|
-
invalidBase64: 'Invalid base64 string',
|
|
79
|
-
invalidHex: 'Invalid hexadecimal string',
|
|
80
|
-
// Uint8Array messages
|
|
81
|
-
expectedUint8Array: 'Expected Uint8Array',
|
|
82
|
-
uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
|
|
83
|
-
uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
|
|
84
|
-
uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
|
|
85
|
-
// Generic type error messages
|
|
86
|
-
expectedString: 'Expected string',
|
|
87
|
-
stringExpected: (received, expected) => `Beklenen: ${expected}, alınan: ${received}`,
|
|
88
|
-
stringBoolExpected: (validValues, received) => `Geçersiz boolean string. Şunlardan biri olmalı: ${validValues}, alınan: "${received}"`,
|
|
89
|
-
invalidJson: 'Geçersiz JSON',
|
|
90
|
-
stringPatternInvalid: 'Dize gerekli kalıpla eşleşmiyor',
|
|
91
|
-
// File validation messages
|
|
92
|
-
invalidFile: 'Expected a File object',
|
|
93
|
-
fileNotSupported: 'File API not supported in this environment',
|
|
94
|
-
fileMinSize: (min) => `File size must be at least ${min} bytes`,
|
|
95
|
-
fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
|
|
96
|
-
fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
|
|
97
|
-
// Function validation messages
|
|
98
|
-
invalidFunction: 'Bir fonksiyon bekleniyor',
|
|
99
|
-
// CIDR validation messages
|
|
100
|
-
stringCidrv4: 'Geçersiz IPv4 CIDR bloğu',
|
|
101
|
-
stringCidrv6: 'Geçersiz IPv6 CIDR bloğu',
|
|
102
|
-
// Safe extend validation messages
|
|
103
|
-
safeExtendOverlap: (keys) => `Mevcut anahtarlar üzerine yazılamaz: ${keys.join(', ')}. Üzerine yazmak istiyorsanız extend() kullanın.`
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export { tr };
|
|
107
|
-
//# sourceMappingURL=tr.js.map
|
|
1
|
+
const e={invalidString:"Geçersiz metin",stringMin:e=>`Metin en az ${e} karakter olmalı`,stringMax:e=>`Metin en fazla ${e} karakter olmalı`,stringLength:e=>`Metin tam olarak ${e} karakter olmalı`,stringEmail:"Geçersiz e-posta adresi",stringUrl:"Geçersiz URL",stringUuid:"Geçersiz UUID",stringRegex:"Geçersiz format",stringStartsWith:e=>`Metin "${e}" ile başlamalı`,stringEndsWith:e=>`Metin "${e}" ile bitmeli`,stringIncludes:e=>`Metin "${e}" içermeli`,stringIp:"Geçersiz IP adresi",stringIpv4:"Geçersiz IPv4 adresi",stringIpv6:"Geçersiz IPv6 adresi",stringEmpty:"Metin boş olmamalı",invalidNumber:"Geçersiz sayı",numberMin:e=>`Sayı en az ${e} olmalı`,numberMax:e=>`Sayı en fazla ${e} olmalı`,numberInt:"Sayı tam sayı olmalı",numberPositive:"Sayı pozitif olmalı",numberNegative:"Sayı negatif olmalı",numberNonnegative:"Sayı negatif olmamalı",numberNonpositive:"Sayı pozitif olmamalı",numberFinite:"Sayı sonlu olmalı",numberSafe:"Sayı güvenli tam sayı olmalı",numberMultipleOf:e=>`Sayı ${e}'nin katı olmalı`,invalidBoolean:"Geçersiz boolean",invalidDate:"Geçersiz tarih",dateMin:e=>`Tarih ${e.toISOString()} sonrasında olmalı`,dateMax:e=>`Tarih ${e.toISOString()} öncesinde olmalı`,invalidObject:"Geçersiz nesne",unexpectedKeys:e=>`Beklenmeyen anahtarlar: ${e.join(", ")}`,invalidArray:"Geçersiz dizi",arrayMin:e=>`Dizi en az ${e} eleman içermeli`,arrayMax:e=>`Dizi en fazla ${e} eleman içermeli`,arrayLength:e=>`Dizi tam olarak ${e} eleman içermeli`,arrayEmpty:"Dizi boş olmamalı",arrayItem:(e,i)=>`${e} indeksindeki eleman geçersiz: ${i}`,objectField:(e,i)=>`"${e}" alanı geçersiz: ${i}`,unionNoMatch:e=>`Hiçbir union üyesi eşleşmedi: ${e.join(", ")}`,intersectionError:e=>`Intersection doğrulaması başarısız: ${e}`,literalExpected:(e,i)=>`${e} beklendi, ${i} alındı`,enumExpected:(e,i)=>`[${e.join(", ")}] değerlerinden biri beklendi, ${i} alındı`,expectedUndefined:"Undefined beklendi",neverType:"Never tipi parse edilemez",invalidBigint:"Geçersiz bigint",invalidSymbol:"Geçersiz symbol",invalidTuple:"Geçersiz tuple",tupleLength:(e,i)=>`Tuple tam olarak ${e} elemana sahip olmalı, ${i} aldı`,invalidRecord:"Geçersiz record",invalidSet:"Geçersiz set",invalidMap:"Geçersiz map",transformError:e=>`Dönüştürme başarısız: ${e}`,refinementError:e=>`Doğrulama başarısız: ${e}`,customValidationError:e=>`Özel doğrulama başarısız: ${e}`,coercionFailed:(e,i)=>`${JSON.stringify(i)} değeri ${e} tipine dönüştürülemez`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`Beklenen: ${i}, alınan: ${e}`,stringBoolExpected:(e,i)=>`Geçersiz boolean string. Şunlardan biri olmalı: ${e}, alınan: "${i}"`,invalidJson:"Geçersiz JSON",stringPatternInvalid:"Dize gerekli kalıpla eşleşmiyor",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"Bir fonksiyon bekleniyor",stringCidrv4:"Geçersiz IPv4 CIDR bloğu",stringCidrv6:"Geçersiz IPv6 CIDR bloğu",safeExtendOverlap:e=>`Mevcut anahtarlar üzerine yazılamaz: ${e.join(", ")}. Üzerine yazmak istiyorsanız extend() kullanın.`};export{e as tr};
|
package/dist/locales/types.d.ts
CHANGED
package/dist/locales/vi.d.ts
CHANGED
package/dist/locales/vi.js
CHANGED
|
@@ -1,107 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
// String validation messages
|
|
3
|
-
invalidString: 'Chuỗi không hợp lệ',
|
|
4
|
-
stringMin: (min) => `Chuỗi phải có ít nhất ${min} ký tự`,
|
|
5
|
-
stringMax: (max) => `Chuỗi không được quá ${max} ký tự`,
|
|
6
|
-
stringLength: (length) => `Chuỗi phải có chính xác ${length} ký tự`,
|
|
7
|
-
stringEmail: 'Địa chỉ email không hợp lệ',
|
|
8
|
-
stringUrl: 'URL không hợp lệ',
|
|
9
|
-
stringUuid: 'UUID không hợp lệ',
|
|
10
|
-
stringRegex: 'Định dạng không hợp lệ',
|
|
11
|
-
stringStartsWith: (prefix) => `Chuỗi phải bắt đầu bằng "${prefix}"`,
|
|
12
|
-
stringEndsWith: (suffix) => `Chuỗi phải kết thúc bằng "${suffix}"`,
|
|
13
|
-
stringIncludes: (substring) => `Chuỗi phải chứa "${substring}"`,
|
|
14
|
-
stringIp: 'Địa chỉ IP không hợp lệ',
|
|
15
|
-
stringIpv4: 'Địa chỉ IPv4 không hợp lệ',
|
|
16
|
-
stringIpv6: 'Địa chỉ IPv6 không hợp lệ',
|
|
17
|
-
stringEmpty: 'Chuỗi không được để trống',
|
|
18
|
-
// Number validation messages
|
|
19
|
-
invalidNumber: 'Số không hợp lệ',
|
|
20
|
-
numberMin: (min) => `Số phải ít nhất là ${min}`,
|
|
21
|
-
numberMax: (max) => `Số không được vượt quá ${max}`,
|
|
22
|
-
numberInt: 'Số phải là số nguyên',
|
|
23
|
-
numberPositive: 'Số phải là số dương',
|
|
24
|
-
numberNegative: 'Số phải là số âm',
|
|
25
|
-
numberNonnegative: 'Số không được là số âm',
|
|
26
|
-
numberNonpositive: 'Số không được là số dương',
|
|
27
|
-
numberFinite: 'Số phải là số hữu hạn',
|
|
28
|
-
numberSafe: 'Số phải là số nguyên an toàn',
|
|
29
|
-
numberMultipleOf: (value) => `Số phải là bội số của ${value}`,
|
|
30
|
-
// Boolean validation messages
|
|
31
|
-
invalidBoolean: 'Giá trị boolean không hợp lệ',
|
|
32
|
-
// Date validation messages
|
|
33
|
-
invalidDate: 'Ngày không hợp lệ',
|
|
34
|
-
dateMin: (date) => `Ngày phải sau ${date.toISOString()}`,
|
|
35
|
-
dateMax: (date) => `Ngày phải trước ${date.toISOString()}`,
|
|
36
|
-
// Object validation messages
|
|
37
|
-
invalidObject: 'Đối tượng không hợp lệ',
|
|
38
|
-
unexpectedKeys: (keys) => `Khóa không mong muốn: ${keys.join(', ')}`,
|
|
39
|
-
// Array validation messages
|
|
40
|
-
invalidArray: 'Mảng không hợp lệ',
|
|
41
|
-
arrayMin: (min) => `Mảng phải có ít nhất ${min} phần tử`,
|
|
42
|
-
arrayMax: (max) => `Mảng không được quá ${max} phần tử`,
|
|
43
|
-
arrayLength: (length) => `Mảng phải có chính xác ${length} phần tử`,
|
|
44
|
-
arrayEmpty: 'Mảng không được để trống',
|
|
45
|
-
arrayItem: (index, error) => `Phần tử không hợp lệ tại vị trí ${index}: ${error}`,
|
|
46
|
-
// Object field validation
|
|
47
|
-
objectField: (field, error) => `Trường "${field}" không hợp lệ: ${error}`,
|
|
48
|
-
// Union validation messages
|
|
49
|
-
unionNoMatch: (errors) => `Không có thành viên union nào khớp: ${errors.join(', ')}`,
|
|
50
|
-
// Intersection validation messages
|
|
51
|
-
intersectionError: (error) => `Xác thực intersection thất bại: ${error}`,
|
|
52
|
-
// Literal validation messages
|
|
53
|
-
literalExpected: (expected, received) => `Mong đợi ${expected}, nhận được ${received}`,
|
|
54
|
-
// Enum validation messages
|
|
55
|
-
enumExpected: (values, received) => `Mong đợi một trong [${values.join(', ')}], nhận được ${received}`,
|
|
56
|
-
// Special type validation messages
|
|
57
|
-
expectedUndefined: 'Mong đợi undefined',
|
|
58
|
-
neverType: 'Không thể phân tích kiểu never',
|
|
59
|
-
// New advanced type validation messages
|
|
60
|
-
invalidBigint: 'Bigint không hợp lệ',
|
|
61
|
-
invalidSymbol: 'Ký hiệu không hợp lệ',
|
|
62
|
-
invalidTuple: 'Tuple không hợp lệ',
|
|
63
|
-
tupleLength: (expected, received) => `Tuple phải có chính xác ${expected} phần tử, nhận được ${received}`,
|
|
64
|
-
invalidRecord: 'Record không hợp lệ',
|
|
65
|
-
invalidSet: 'Set không hợp lệ',
|
|
66
|
-
invalidMap: 'Map không hợp lệ',
|
|
67
|
-
// Transformation and refinement messages
|
|
68
|
-
transformError: (error) => `Biến đổi thất bại: ${error}`,
|
|
69
|
-
refinementError: (error) => `Tinh chế thất bại: ${error}`,
|
|
70
|
-
customValidationError: (error) => `Xác thực tùy chỉnh thất bại: ${error}`,
|
|
71
|
-
// Coercion messages
|
|
72
|
-
coercionFailed: (type, value) => `Không thể ép kiểu ${JSON.stringify(value)} thành ${type}`,
|
|
73
|
-
// Codec messages
|
|
74
|
-
codecDecodeFailed: 'Failed to decode value',
|
|
75
|
-
codecEncodeFailed: 'Failed to encode value',
|
|
76
|
-
codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
|
|
77
|
-
// Base64/Hex messages
|
|
78
|
-
invalidBase64: 'Invalid base64 string',
|
|
79
|
-
invalidHex: 'Invalid hexadecimal string',
|
|
80
|
-
// Uint8Array messages
|
|
81
|
-
expectedUint8Array: 'Expected Uint8Array',
|
|
82
|
-
uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
|
|
83
|
-
uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
|
|
84
|
-
uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
|
|
85
|
-
// Generic type error messages
|
|
86
|
-
expectedString: 'Expected string',
|
|
87
|
-
stringExpected: (received, expected) => `Mong đợi ${expected}, nhận được ${received}`,
|
|
88
|
-
stringBoolExpected: (validValues, received) => `Chuỗi boolean không hợp lệ. Mong đợi một trong các: ${validValues}, nhận được: "${received}"`,
|
|
89
|
-
invalidJson: 'JSON không hợp lệ',
|
|
90
|
-
stringPatternInvalid: 'Chuỗi không khớp với mẫu bắt buộc',
|
|
91
|
-
// File validation messages
|
|
92
|
-
invalidFile: 'Expected a File object',
|
|
93
|
-
fileNotSupported: 'File API not supported in this environment',
|
|
94
|
-
fileMinSize: (min) => `File size must be at least ${min} bytes`,
|
|
95
|
-
fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
|
|
96
|
-
fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
|
|
97
|
-
// Function validation messages
|
|
98
|
-
invalidFunction: 'Mong đợi một hàm',
|
|
99
|
-
// CIDR validation messages
|
|
100
|
-
stringCidrv4: 'Khối CIDR IPv4 không hợp lệ',
|
|
101
|
-
stringCidrv6: 'Khối CIDR IPv6 không hợp lệ',
|
|
102
|
-
// Safe extend validation messages
|
|
103
|
-
safeExtendOverlap: (keys) => `Không thể ghi đè các khóa hiện có: ${keys.join(', ')}. Sử dụng extend() để ghi đè.`
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export { vi };
|
|
107
|
-
//# sourceMappingURL=vi.js.map
|
|
1
|
+
const n={invalidString:"Chuỗi không hợp lệ",stringMin:n=>`Chuỗi phải có ít nhất ${n} ký tự`,stringMax:n=>`Chuỗi không được quá ${n} ký tự`,stringLength:n=>`Chuỗi phải có chính xác ${n} ký tự`,stringEmail:"Địa chỉ email không hợp lệ",stringUrl:"URL không hợp lệ",stringUuid:"UUID không hợp lệ",stringRegex:"Định dạng không hợp lệ",stringStartsWith:n=>`Chuỗi phải bắt đầu bằng "${n}"`,stringEndsWith:n=>`Chuỗi phải kết thúc bằng "${n}"`,stringIncludes:n=>`Chuỗi phải chứa "${n}"`,stringIp:"Địa chỉ IP không hợp lệ",stringIpv4:"Địa chỉ IPv4 không hợp lệ",stringIpv6:"Địa chỉ IPv6 không hợp lệ",stringEmpty:"Chuỗi không được để trống",invalidNumber:"Số không hợp lệ",numberMin:n=>`Số phải ít nhất là ${n}`,numberMax:n=>`Số không được vượt quá ${n}`,numberInt:"Số phải là số nguyên",numberPositive:"Số phải là số dương",numberNegative:"Số phải là số âm",numberNonnegative:"Số không được là số âm",numberNonpositive:"Số không được là số dương",numberFinite:"Số phải là số hữu hạn",numberSafe:"Số phải là số nguyên an toàn",numberMultipleOf:n=>`Số phải là bội số của ${n}`,invalidBoolean:"Giá trị boolean không hợp lệ",invalidDate:"Ngày không hợp lệ",dateMin:n=>`Ngày phải sau ${n.toISOString()}`,dateMax:n=>`Ngày phải trước ${n.toISOString()}`,invalidObject:"Đối tượng không hợp lệ",unexpectedKeys:n=>`Khóa không mong muốn: ${n.join(", ")}`,invalidArray:"Mảng không hợp lệ",arrayMin:n=>`Mảng phải có ít nhất ${n} phần tử`,arrayMax:n=>`Mảng không được quá ${n} phần tử`,arrayLength:n=>`Mảng phải có chính xác ${n} phần tử`,arrayEmpty:"Mảng không được để trống",arrayItem:(n,i)=>`Phần tử không hợp lệ tại vị trí ${n}: ${i}`,objectField:(n,i)=>`Trường "${n}" không hợp lệ: ${i}`,unionNoMatch:n=>`Không có thành viên union nào khớp: ${n.join(", ")}`,intersectionError:n=>`Xác thực intersection thất bại: ${n}`,literalExpected:(n,i)=>`Mong đợi ${n}, nhận được ${i}`,enumExpected:(n,i)=>`Mong đợi một trong [${n.join(", ")}], nhận được ${i}`,expectedUndefined:"Mong đợi undefined",neverType:"Không thể phân tích kiểu never",invalidBigint:"Bigint không hợp lệ",invalidSymbol:"Ký hiệu không hợp lệ",invalidTuple:"Tuple không hợp lệ",tupleLength:(n,i)=>`Tuple phải có chính xác ${n} phần tử, nhận được ${i}`,invalidRecord:"Record không hợp lệ",invalidSet:"Set không hợp lệ",invalidMap:"Map không hợp lệ",transformError:n=>`Biến đổi thất bại: ${n}`,refinementError:n=>`Tinh chế thất bại: ${n}`,customValidationError:n=>`Xác thực tùy chỉnh thất bại: ${n}`,coercionFailed:(n,i)=>`Không thể ép kiểu ${JSON.stringify(i)} thành ${n}`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:n=>`Uint8Array must have at least ${n} bytes`,uint8ArrayMaxLength:n=>`Uint8Array must have at most ${n} bytes`,uint8ArrayExactLength:n=>`Uint8Array must have exactly ${n} bytes`,expectedString:"Expected string",stringExpected:(n,i)=>`Mong đợi ${i}, nhận được ${n}`,stringBoolExpected:(n,i)=>`Chuỗi boolean không hợp lệ. Mong đợi một trong các: ${n}, nhận được: "${i}"`,invalidJson:"JSON không hợp lệ",stringPatternInvalid:"Chuỗi không khớp với mẫu bắt buộc",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:n=>`File size must be at least ${n} bytes`,fileMaxSize:n=>`File size must not exceed ${n} bytes`,fileMimeType:n=>`Invalid file type. Expected: ${n.join(", ")}`,invalidFunction:"Mong đợi một hàm",stringCidrv4:"Khối CIDR IPv4 không hợp lệ",stringCidrv6:"Khối CIDR IPv6 không hợp lệ",safeExtendOverlap:n=>`Không thể ghi đè các khóa hiện có: ${n.join(", ")}. Sử dụng extend() để ghi đè.`};export{n as vi};
|
package/dist/locales/zh.d.ts
CHANGED
package/dist/locales/zh.js
CHANGED
|
@@ -1,107 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
// String validation messages
|
|
3
|
-
invalidString: '无效字符串',
|
|
4
|
-
stringMin: (min) => `字符串必须至少${min}个字符`,
|
|
5
|
-
stringMax: (max) => `字符串不能超过${max}个字符`,
|
|
6
|
-
stringLength: (length) => `字符串必须正好${length}个字符`,
|
|
7
|
-
stringEmail: '无效邮箱地址',
|
|
8
|
-
stringUrl: '无效URL',
|
|
9
|
-
stringUuid: '无效UUID',
|
|
10
|
-
stringRegex: '无效格式',
|
|
11
|
-
stringStartsWith: (prefix) => `字符串必须以"${prefix}"开头`,
|
|
12
|
-
stringEndsWith: (suffix) => `字符串必须以"${suffix}"结尾`,
|
|
13
|
-
stringIncludes: (substring) => `字符串必须包含"${substring}"`,
|
|
14
|
-
stringIp: '无效IP地址',
|
|
15
|
-
stringIpv4: '无效IPv4地址',
|
|
16
|
-
stringIpv6: '无效IPv6地址',
|
|
17
|
-
stringEmpty: '字符串不能为空',
|
|
18
|
-
// Number validation messages
|
|
19
|
-
invalidNumber: '无效数字',
|
|
20
|
-
numberMin: (min) => `数字必须至少为${min}`,
|
|
21
|
-
numberMax: (max) => `数字不能大于${max}`,
|
|
22
|
-
numberInt: '数字必须是整数',
|
|
23
|
-
numberPositive: '数字必须是正数',
|
|
24
|
-
numberNegative: '数字必须是负数',
|
|
25
|
-
numberNonnegative: '数字不能是负数',
|
|
26
|
-
numberNonpositive: '数字不能是正数',
|
|
27
|
-
numberFinite: '数字必须是有限的',
|
|
28
|
-
numberSafe: '数字必须是安全整数',
|
|
29
|
-
numberMultipleOf: (value) => `数字必须是${value}的倍数`,
|
|
30
|
-
// Boolean validation messages
|
|
31
|
-
invalidBoolean: '无效布尔值',
|
|
32
|
-
// Date validation messages
|
|
33
|
-
invalidDate: '无效日期',
|
|
34
|
-
dateMin: (date) => `日期必须在${date.toISOString()}之后`,
|
|
35
|
-
dateMax: (date) => `日期必须在${date.toISOString()}之前`,
|
|
36
|
-
// Object validation messages
|
|
37
|
-
invalidObject: '无效对象',
|
|
38
|
-
unexpectedKeys: (keys) => `意外的键: ${keys.join(', ')}`,
|
|
39
|
-
// Array validation messages
|
|
40
|
-
invalidArray: '无效数组',
|
|
41
|
-
arrayMin: (min) => `数组必须至少有${min}个元素`,
|
|
42
|
-
arrayMax: (max) => `数组不能超过${max}个元素`,
|
|
43
|
-
arrayLength: (length) => `数组必须正好有${length}个元素`,
|
|
44
|
-
arrayEmpty: '数组不能为空',
|
|
45
|
-
arrayItem: (index, error) => `索引${index}处的无效元素: ${error}`,
|
|
46
|
-
// Object field validation
|
|
47
|
-
objectField: (field, error) => `无效字段"${field}": ${error}`,
|
|
48
|
-
// Union validation messages
|
|
49
|
-
unionNoMatch: (errors) => `没有匹配的联合成员: ${errors.join(', ')}`,
|
|
50
|
-
// Intersection validation messages
|
|
51
|
-
intersectionError: (error) => `交集验证失败: ${error}`,
|
|
52
|
-
// Literal validation messages
|
|
53
|
-
literalExpected: (expected, received) => `期望${expected},得到${received}`,
|
|
54
|
-
// Enum validation messages
|
|
55
|
-
enumExpected: (values, received) => `期望[${values.join(', ')}]中的一个,得到${received}`,
|
|
56
|
-
// Special type validation messages
|
|
57
|
-
expectedUndefined: '期望undefined',
|
|
58
|
-
neverType: 'never类型无法解析',
|
|
59
|
-
// New advanced type validation messages
|
|
60
|
-
invalidBigint: '无效bigint',
|
|
61
|
-
invalidSymbol: '无效符号',
|
|
62
|
-
invalidTuple: '无效元组',
|
|
63
|
-
tupleLength: (expected, received) => `元组必须正好有${expected}个元素,得到${received}个`,
|
|
64
|
-
invalidRecord: '无效记录',
|
|
65
|
-
invalidSet: '无效Set',
|
|
66
|
-
invalidMap: '无效Map',
|
|
67
|
-
// Transformation and refinement messages
|
|
68
|
-
transformError: (error) => `转换失败: ${error}`,
|
|
69
|
-
refinementError: (error) => `细化失败: ${error}`,
|
|
70
|
-
customValidationError: (error) => `自定义验证失败: ${error}`,
|
|
71
|
-
// Coercion messages
|
|
72
|
-
coercionFailed: (type, value) => `无法将${JSON.stringify(value)}强制转换为${type}`,
|
|
73
|
-
// Codec messages
|
|
74
|
-
codecDecodeFailed: 'Failed to decode value',
|
|
75
|
-
codecEncodeFailed: 'Failed to encode value',
|
|
76
|
-
codecAsyncNotSupported: 'Async codec operations require using parseAsync/encodeAsync methods',
|
|
77
|
-
// Base64/Hex messages
|
|
78
|
-
invalidBase64: 'Invalid base64 string',
|
|
79
|
-
invalidHex: 'Invalid hexadecimal string',
|
|
80
|
-
// Uint8Array messages
|
|
81
|
-
expectedUint8Array: 'Expected Uint8Array',
|
|
82
|
-
uint8ArrayMinLength: (min) => `Uint8Array must have at least ${min} bytes`,
|
|
83
|
-
uint8ArrayMaxLength: (max) => `Uint8Array must have at most ${max} bytes`,
|
|
84
|
-
uint8ArrayExactLength: (length) => `Uint8Array must have exactly ${length} bytes`,
|
|
85
|
-
// Generic type error messages
|
|
86
|
-
expectedString: 'Expected string',
|
|
87
|
-
stringExpected: (received, expected) => `期望${expected},得到${received}`,
|
|
88
|
-
stringBoolExpected: (validValues, received) => `无效的布尔字符串。期望以下之一: ${validValues},得到: "${received}"`,
|
|
89
|
-
invalidJson: '无效的JSON',
|
|
90
|
-
stringPatternInvalid: '字符串与所需模式不匹配',
|
|
91
|
-
// File validation messages
|
|
92
|
-
invalidFile: 'Expected a File object',
|
|
93
|
-
fileNotSupported: 'File API not supported in this environment',
|
|
94
|
-
fileMinSize: (min) => `File size must be at least ${min} bytes`,
|
|
95
|
-
fileMaxSize: (max) => `File size must not exceed ${max} bytes`,
|
|
96
|
-
fileMimeType: (allowed) => `Invalid file type. Expected: ${allowed.join(", ")}`,
|
|
97
|
-
// Function validation messages
|
|
98
|
-
invalidFunction: '期望一个函数',
|
|
99
|
-
// CIDR validation messages
|
|
100
|
-
stringCidrv4: '无效的IPv4 CIDR块',
|
|
101
|
-
stringCidrv6: '无效的IPv6 CIDR块',
|
|
102
|
-
// Safe extend validation messages
|
|
103
|
-
safeExtendOverlap: (keys) => `无法覆盖现有键: ${keys.join(', ')}。如果要覆盖请使用extend()。`
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export { zh };
|
|
107
|
-
//# sourceMappingURL=zh.js.map
|
|
1
|
+
const e={invalidString:"无效字符串",stringMin:e=>`字符串必须至少${e}个字符`,stringMax:e=>`字符串不能超过${e}个字符`,stringLength:e=>`字符串必须正好${e}个字符`,stringEmail:"无效邮箱地址",stringUrl:"无效URL",stringUuid:"无效UUID",stringRegex:"无效格式",stringStartsWith:e=>`字符串必须以"${e}"开头`,stringEndsWith:e=>`字符串必须以"${e}"结尾`,stringIncludes:e=>`字符串必须包含"${e}"`,stringIp:"无效IP地址",stringIpv4:"无效IPv4地址",stringIpv6:"无效IPv6地址",stringEmpty:"字符串不能为空",invalidNumber:"无效数字",numberMin:e=>`数字必须至少为${e}`,numberMax:e=>`数字不能大于${e}`,numberInt:"数字必须是整数",numberPositive:"数字必须是正数",numberNegative:"数字必须是负数",numberNonnegative:"数字不能是负数",numberNonpositive:"数字不能是正数",numberFinite:"数字必须是有限的",numberSafe:"数字必须是安全整数",numberMultipleOf:e=>`数字必须是${e}的倍数`,invalidBoolean:"无效布尔值",invalidDate:"无效日期",dateMin:e=>`日期必须在${e.toISOString()}之后`,dateMax:e=>`日期必须在${e.toISOString()}之前`,invalidObject:"无效对象",unexpectedKeys:e=>`意外的键: ${e.join(", ")}`,invalidArray:"无效数组",arrayMin:e=>`数组必须至少有${e}个元素`,arrayMax:e=>`数组不能超过${e}个元素`,arrayLength:e=>`数组必须正好有${e}个元素`,arrayEmpty:"数组不能为空",arrayItem:(e,i)=>`索引${e}处的无效元素: ${i}`,objectField:(e,i)=>`无效字段"${e}": ${i}`,unionNoMatch:e=>`没有匹配的联合成员: ${e.join(", ")}`,intersectionError:e=>`交集验证失败: ${e}`,literalExpected:(e,i)=>`期望${e},得到${i}`,enumExpected:(e,i)=>`期望[${e.join(", ")}]中的一个,得到${i}`,expectedUndefined:"期望undefined",neverType:"never类型无法解析",invalidBigint:"无效bigint",invalidSymbol:"无效符号",invalidTuple:"无效元组",tupleLength:(e,i)=>`元组必须正好有${e}个元素,得到${i}个`,invalidRecord:"无效记录",invalidSet:"无效Set",invalidMap:"无效Map",transformError:e=>`转换失败: ${e}`,refinementError:e=>`细化失败: ${e}`,customValidationError:e=>`自定义验证失败: ${e}`,coercionFailed:(e,i)=>`无法将${JSON.stringify(i)}强制转换为${e}`,codecDecodeFailed:"Failed to decode value",codecEncodeFailed:"Failed to encode value",codecAsyncNotSupported:"Async codec operations require using parseAsync/encodeAsync methods",invalidBase64:"Invalid base64 string",invalidHex:"Invalid hexadecimal string",expectedUint8Array:"Expected Uint8Array",uint8ArrayMinLength:e=>`Uint8Array must have at least ${e} bytes`,uint8ArrayMaxLength:e=>`Uint8Array must have at most ${e} bytes`,uint8ArrayExactLength:e=>`Uint8Array must have exactly ${e} bytes`,expectedString:"Expected string",stringExpected:(e,i)=>`期望${i},得到${e}`,stringBoolExpected:(e,i)=>`无效的布尔字符串。期望以下之一: ${e},得到: "${i}"`,invalidJson:"无效的JSON",stringPatternInvalid:"字符串与所需模式不匹配",invalidFile:"Expected a File object",fileNotSupported:"File API not supported in this environment",fileMinSize:e=>`File size must be at least ${e} bytes`,fileMaxSize:e=>`File size must not exceed ${e} bytes`,fileMimeType:e=>`Invalid file type. Expected: ${e.join(", ")}`,invalidFunction:"期望一个函数",stringCidrv4:"无效的IPv4 CIDR块",stringCidrv6:"无效的IPv6 CIDR块",safeExtendOverlap:e=>`无法覆盖现有键: ${e.join(", ")}。如果要覆盖请使用extend()。`};export{e as zh};
|
package/dist/logger.d.ts
CHANGED
package/dist/mini.d.ts
CHANGED
|
@@ -14,71 +14,71 @@
|
|
|
14
14
|
* });
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
export { VldBase, ParseResult, VldRefine, VldTransform, VldDefault, VldCatch, VldOptional, VldNullable, VldNullish, VldPipe, VldReadonly, VldBrand, VldPreprocess, SuperRefineContext, VldSuperRefine } from './validators/base';
|
|
18
|
-
export { VldString } from './validators/string';
|
|
19
|
-
export { VldNumber } from './validators/number';
|
|
20
|
-
export { VldBoolean } from './validators/boolean';
|
|
21
|
-
export { VldDate } from './validators/date';
|
|
22
|
-
export { VldBigInt } from './validators/bigint';
|
|
23
|
-
export { VldSymbol } from './validators/symbol';
|
|
24
|
-
export { VldStringBool } from './validators/string-bool';
|
|
25
|
-
export { VldArray } from './validators/array';
|
|
26
|
-
export { VldObject } from './validators/object';
|
|
27
|
-
export { VldTuple } from './validators/tuple';
|
|
28
|
-
export { VldRecord } from './validators/record';
|
|
29
|
-
export { VldSet } from './validators/set';
|
|
30
|
-
export { VldMap } from './validators/map';
|
|
31
|
-
export { VldUnion } from './validators/union';
|
|
32
|
-
export { VldIntersection } from './validators/intersection';
|
|
33
|
-
export { VldLiteral } from './validators/literal';
|
|
34
|
-
export { VldEnum } from './validators/enum';
|
|
35
|
-
export { VldAny } from './validators/any';
|
|
36
|
-
export { VldUnknown } from './validators/unknown';
|
|
37
|
-
export { VldVoid } from './validators/void';
|
|
38
|
-
export { VldNever } from './validators/never';
|
|
39
|
-
export { VldNull } from './validators/null';
|
|
40
|
-
export { VldUndefined } from './validators/undefined';
|
|
41
|
-
export { VldNan } from './validators/nan';
|
|
42
|
-
export { VldLazy } from './validators/lazy';
|
|
43
|
-
export { VldDiscriminatedUnion } from './validators/discriminated-union';
|
|
44
|
-
export { VldXor } from './validators/xor';
|
|
45
|
-
export { VldJson } from './validators/json';
|
|
46
|
-
import type { VldBase } from './validators/base';
|
|
17
|
+
export { VldBase, ParseResult, VldRefine, VldTransform, VldDefault, VldCatch, VldOptional, VldNullable, VldNullish, VldPipe, VldReadonly, VldBrand, VldPreprocess, SuperRefineContext, VldSuperRefine } from './validators/base.js';
|
|
18
|
+
export { VldString } from './validators/string.js';
|
|
19
|
+
export { VldNumber } from './validators/number.js';
|
|
20
|
+
export { VldBoolean } from './validators/boolean.js';
|
|
21
|
+
export { VldDate } from './validators/date.js';
|
|
22
|
+
export { VldBigInt } from './validators/bigint.js';
|
|
23
|
+
export { VldSymbol } from './validators/symbol.js';
|
|
24
|
+
export { VldStringBool } from './validators/string-bool.js';
|
|
25
|
+
export { VldArray } from './validators/array.js';
|
|
26
|
+
export { VldObject } from './validators/object.js';
|
|
27
|
+
export { VldTuple } from './validators/tuple.js';
|
|
28
|
+
export { VldRecord } from './validators/record.js';
|
|
29
|
+
export { VldSet } from './validators/set.js';
|
|
30
|
+
export { VldMap } from './validators/map.js';
|
|
31
|
+
export { VldUnion } from './validators/union.js';
|
|
32
|
+
export { VldIntersection } from './validators/intersection.js';
|
|
33
|
+
export { VldLiteral } from './validators/literal.js';
|
|
34
|
+
export { VldEnum } from './validators/enum.js';
|
|
35
|
+
export { VldAny } from './validators/any.js';
|
|
36
|
+
export { VldUnknown } from './validators/unknown.js';
|
|
37
|
+
export { VldVoid } from './validators/void.js';
|
|
38
|
+
export { VldNever } from './validators/never.js';
|
|
39
|
+
export { VldNull } from './validators/null.js';
|
|
40
|
+
export { VldUndefined } from './validators/undefined.js';
|
|
41
|
+
export { VldNan } from './validators/nan.js';
|
|
42
|
+
export { VldLazy } from './validators/lazy.js';
|
|
43
|
+
export { VldDiscriminatedUnion } from './validators/discriminated-union.js';
|
|
44
|
+
export { VldXor } from './validators/xor.js';
|
|
45
|
+
export { VldJson } from './validators/json.js';
|
|
46
|
+
import type { VldBase } from './validators/base.js';
|
|
47
47
|
/** Infer the output type of a validator */
|
|
48
48
|
export type Infer<T extends VldBase<any, any>> = T extends VldBase<any, infer U> ? U : never;
|
|
49
49
|
/** Infer the input type of a validator */
|
|
50
50
|
export type Input<T extends VldBase<any, any>> = T extends VldBase<infer I, any> ? I : never;
|
|
51
51
|
/** Infer the output type of a validator (alias for Infer) */
|
|
52
52
|
export type Output<T extends VldBase<any, any>> = Infer<T>;
|
|
53
|
-
import { VldString } from './validators/string';
|
|
54
|
-
import { VldNumber } from './validators/number';
|
|
55
|
-
import { VldBoolean } from './validators/boolean';
|
|
56
|
-
import { VldDate } from './validators/date';
|
|
57
|
-
import { VldBigInt } from './validators/bigint';
|
|
58
|
-
import { VldSymbol } from './validators/symbol';
|
|
59
|
-
import { VldStringBool } from './validators/string-bool';
|
|
60
|
-
import { VldArray } from './validators/array';
|
|
61
|
-
import { VldObject } from './validators/object';
|
|
62
|
-
import { VldTuple } from './validators/tuple';
|
|
63
|
-
import { VldRecord } from './validators/record';
|
|
64
|
-
import { VldSet } from './validators/set';
|
|
65
|
-
import { VldMap } from './validators/map';
|
|
66
|
-
import { VldUnion } from './validators/union';
|
|
67
|
-
import { VldIntersection } from './validators/intersection';
|
|
68
|
-
import { VldLiteral } from './validators/literal';
|
|
69
|
-
import { VldEnum } from './validators/enum';
|
|
70
|
-
import { VldAny } from './validators/any';
|
|
71
|
-
import { VldUnknown } from './validators/unknown';
|
|
72
|
-
import { VldVoid } from './validators/void';
|
|
73
|
-
import { VldNever } from './validators/never';
|
|
74
|
-
import { VldNull } from './validators/null';
|
|
75
|
-
import { VldUndefined } from './validators/undefined';
|
|
76
|
-
import { VldNan } from './validators/nan';
|
|
77
|
-
import { VldLazy } from './validators/lazy';
|
|
78
|
-
import { VldDiscriminatedUnion } from './validators/discriminated-union';
|
|
79
|
-
import { VldXor } from './validators/xor';
|
|
80
|
-
import { VldJson } from './validators/json';
|
|
81
|
-
import { VldOptional, VldNullable, VldNullish, VldPreprocess } from './validators/base';
|
|
53
|
+
import { VldString } from './validators/string.js';
|
|
54
|
+
import { VldNumber } from './validators/number.js';
|
|
55
|
+
import { VldBoolean } from './validators/boolean.js';
|
|
56
|
+
import { VldDate } from './validators/date.js';
|
|
57
|
+
import { VldBigInt } from './validators/bigint.js';
|
|
58
|
+
import { VldSymbol } from './validators/symbol.js';
|
|
59
|
+
import { VldStringBool } from './validators/string-bool.js';
|
|
60
|
+
import { VldArray } from './validators/array.js';
|
|
61
|
+
import { VldObject } from './validators/object.js';
|
|
62
|
+
import { VldTuple } from './validators/tuple.js';
|
|
63
|
+
import { VldRecord } from './validators/record.js';
|
|
64
|
+
import { VldSet } from './validators/set.js';
|
|
65
|
+
import { VldMap } from './validators/map.js';
|
|
66
|
+
import { VldUnion } from './validators/union.js';
|
|
67
|
+
import { VldIntersection } from './validators/intersection.js';
|
|
68
|
+
import { VldLiteral } from './validators/literal.js';
|
|
69
|
+
import { VldEnum } from './validators/enum.js';
|
|
70
|
+
import { VldAny } from './validators/any.js';
|
|
71
|
+
import { VldUnknown } from './validators/unknown.js';
|
|
72
|
+
import { VldVoid } from './validators/void.js';
|
|
73
|
+
import { VldNever } from './validators/never.js';
|
|
74
|
+
import { VldNull } from './validators/null.js';
|
|
75
|
+
import { VldUndefined } from './validators/undefined.js';
|
|
76
|
+
import { VldNan } from './validators/nan.js';
|
|
77
|
+
import { VldLazy } from './validators/lazy.js';
|
|
78
|
+
import { VldDiscriminatedUnion } from './validators/discriminated-union.js';
|
|
79
|
+
import { VldXor } from './validators/xor.js';
|
|
80
|
+
import { VldJson } from './validators/json.js';
|
|
81
|
+
import { VldOptional, VldNullable, VldNullish, VldPreprocess } from './validators/base.js';
|
|
82
82
|
/** Create a string validator */
|
|
83
83
|
export declare const string: () => VldString;
|
|
84
84
|
/** Create a number validator */
|
|
@@ -110,11 +110,11 @@ export declare const strictObject: <T extends Record<string, any>>(shape: { [K i
|
|
|
110
110
|
/** Create a loose object validator (extra keys passed through) */
|
|
111
111
|
export declare const looseObject: <T extends Record<string, any>>(shape: { [K in keyof T]: VldBase<unknown, T[K]>; }) => VldObject<T>;
|
|
112
112
|
/** Create a tuple validator */
|
|
113
|
-
export declare const tuple: <T extends readonly VldBase<any, any>[]>(...items: T) => VldTuple<[...T]>;
|
|
113
|
+
export declare const tuple: <T extends readonly VldBase<any, any>[]>(...items: T) => VldTuple<[...T], null>;
|
|
114
114
|
/** Create a record validator */
|
|
115
|
-
export declare const record: <T>(value: VldBase<unknown, T>) => VldRecord<T>;
|
|
115
|
+
export declare const record: <T>(value: VldBase<unknown, T>) => VldRecord<T, string>;
|
|
116
116
|
/** Create a partial record validator */
|
|
117
|
-
export declare const partialRecord: <T>(value: VldBase<unknown, T>) => VldRecord<T | undefined>;
|
|
117
|
+
export declare const partialRecord: <T>(value: VldBase<unknown, T>) => VldRecord<T | undefined, string>;
|
|
118
118
|
/** Create a loose record validator */
|
|
119
119
|
export declare const looseRecord: <T>(value: VldBase<unknown, T>) => VldBase<unknown, Record<string, T>>;
|
|
120
120
|
/** Create a set validator */
|
|
@@ -159,11 +159,11 @@ export declare const nullable: <TInput, TOutput>(validator: VldBase<TInput, TOut
|
|
|
159
159
|
export declare const nullish: <TInput, TOutput>(validator: VldBase<TInput, TOutput>) => VldNullish<TInput, TOutput>;
|
|
160
160
|
/** Preprocess input before validation */
|
|
161
161
|
export declare const preprocess: <TInput, TOutput>(preprocessor: (input: unknown) => unknown, schema: VldBase<TInput, TOutput>) => VldPreprocess<TInput, TOutput>;
|
|
162
|
-
import { VldCoerceString } from './coercion/string';
|
|
163
|
-
import { VldCoerceNumber } from './coercion/number';
|
|
164
|
-
import { VldCoerceBoolean } from './coercion/boolean';
|
|
165
|
-
import { VldCoerceDate } from './coercion/date';
|
|
166
|
-
import { VldCoerceBigInt } from './coercion/bigint';
|
|
162
|
+
import { VldCoerceString } from './coercion/string.js';
|
|
163
|
+
import { VldCoerceNumber } from './coercion/number.js';
|
|
164
|
+
import { VldCoerceBoolean } from './coercion/boolean.js';
|
|
165
|
+
import { VldCoerceDate } from './coercion/date.js';
|
|
166
|
+
import { VldCoerceBigInt } from './coercion/bigint.js';
|
|
167
167
|
/** Coercion validators - convert values to target type before validation */
|
|
168
168
|
export declare const coerce: {
|
|
169
169
|
/** Coerce to string */
|
|
@@ -179,4 +179,3 @@ export declare const coerce: {
|
|
|
179
179
|
};
|
|
180
180
|
/** NEVER constant for use in transforms - Zod 4 API parity */
|
|
181
181
|
export declare const NEVER: VldNever;
|
|
182
|
-
//# sourceMappingURL=mini.d.ts.map
|