zod 4.2.0-canary.20250911T045937 → 4.2.0-canary.20250911T051312

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/v4/locales/kh.cjs CHANGED
@@ -1,144 +1,12 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.default = default_1;
27
- const util = __importStar(require("../core/util.cjs"));
28
- const error = () => {
29
- const Sizable = {
30
- string: { unit: "តួអក្សរ", verb: "គួរមាន" },
31
- file: { unit: "បៃ", verb: "គួរមាន" },
32
- array: { unit: "ធាតុ", verb: "គួរមាន" },
33
- set: { unit: "ធាតុ", verb: "គួរមាន" },
34
- };
35
- function getSizing(origin) {
36
- return Sizable[origin] ?? null;
37
- }
38
- const parsedType = (data) => {
39
- const t = typeof data;
40
- switch (t) {
41
- case "number": {
42
- return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
43
- }
44
- case "object": {
45
- if (Array.isArray(data)) {
46
- return "អារេ (Array)";
47
- }
48
- if (data === null) {
49
- return "គ្មានតម្លៃ (null)";
50
- }
51
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
52
- return data.constructor.name;
53
- }
54
- }
55
- }
56
- return t;
57
- };
58
- const Nouns = {
59
- regex: "ទិន្នន័យបញ្ចូល",
60
- email: "អាសយដ្ឋានអ៊ីមែល",
61
- url: "URL",
62
- emoji: "សញ្ញាអារម្មណ៍",
63
- uuid: "UUID",
64
- uuidv4: "UUIDv4",
65
- uuidv6: "UUIDv6",
66
- nanoid: "nanoid",
67
- guid: "GUID",
68
- cuid: "cuid",
69
- cuid2: "cuid2",
70
- ulid: "ULID",
71
- xid: "XID",
72
- ksuid: "KSUID",
73
- datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
74
- date: "កាលបរិច្ឆេទ ISO",
75
- time: "ម៉ោង ISO",
76
- duration: "រយៈពេល ISO",
77
- ipv4: "អាសយដ្ឋាន IPv4",
78
- ipv6: "អាសយដ្ឋាន IPv6",
79
- cidrv4: "ដែនអាសយដ្ឋាន IPv4",
80
- cidrv6: "ដែនអាសយដ្ឋាន IPv6",
81
- base64: "ខ្សែអក្សរអ៊ិកូដ base64",
82
- base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
83
- json_string: "ខ្សែអក្សរ JSON",
84
- e164: "លេខ E.164",
85
- jwt: "JWT",
86
- template_literal: "ទិន្នន័យបញ្ចូល",
87
- };
88
- return (issue) => {
89
- switch (issue.code) {
90
- case "invalid_type":
91
- return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
92
- case "invalid_value":
93
- if (issue.values.length === 1)
94
- return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
95
- return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
96
- case "too_big": {
97
- const adj = issue.inclusive ? "<=" : "<";
98
- const sizing = getSizing(issue.origin);
99
- if (sizing)
100
- return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
101
- return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
102
- }
103
- case "too_small": {
104
- const adj = issue.inclusive ? ">=" : ">";
105
- const sizing = getSizing(issue.origin);
106
- if (sizing) {
107
- return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
108
- }
109
- return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
110
- }
111
- case "invalid_format": {
112
- const _issue = issue;
113
- if (_issue.format === "starts_with") {
114
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
115
- }
116
- if (_issue.format === "ends_with")
117
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
118
- if (_issue.format === "includes")
119
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
120
- if (_issue.format === "regex")
121
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
122
- return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
123
- }
124
- case "not_multiple_of":
125
- return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
126
- case "unrecognized_keys":
127
- return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
128
- case "invalid_key":
129
- return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
130
- case "invalid_union":
131
- return `ទិន្នន័យមិនត្រឹមត្រូវ`;
132
- case "invalid_element":
133
- return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
134
- default:
135
- return `ទិន្នន័យមិនត្រឹមត្រូវ`;
136
- }
137
- };
138
- };
7
+ const km_js_1 = __importDefault(require("./km.cjs"));
8
+ /** @deprecated Use `km` instead. */
139
9
  function default_1() {
140
- return {
141
- localeError: error(),
142
- };
10
+ return (0, km_js_1.default)();
143
11
  }
144
12
  module.exports = exports.default;
@@ -1,4 +1,5 @@
1
1
  import type * as errors from "../core/errors.js";
2
+ /** @deprecated Use `km` instead. */
2
3
  export default function (): {
3
4
  localeError: errors.$ZodErrorMap;
4
5
  };
package/v4/locales/kh.js CHANGED
@@ -1,117 +1,5 @@
1
- import * as util from "../core/util.js";
2
- const error = () => {
3
- const Sizable = {
4
- string: { unit: "តួអក្សរ", verb: "គួរមាន" },
5
- file: { unit: "បៃ", verb: "គួរមាន" },
6
- array: { unit: "ធាតុ", verb: "គួរមាន" },
7
- set: { unit: "ធាតុ", verb: "គួរមាន" },
8
- };
9
- function getSizing(origin) {
10
- return Sizable[origin] ?? null;
11
- }
12
- const parsedType = (data) => {
13
- const t = typeof data;
14
- switch (t) {
15
- case "number": {
16
- return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
17
- }
18
- case "object": {
19
- if (Array.isArray(data)) {
20
- return "អារេ (Array)";
21
- }
22
- if (data === null) {
23
- return "គ្មានតម្លៃ (null)";
24
- }
25
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
26
- return data.constructor.name;
27
- }
28
- }
29
- }
30
- return t;
31
- };
32
- const Nouns = {
33
- regex: "ទិន្នន័យបញ្ចូល",
34
- email: "អាសយដ្ឋានអ៊ីមែល",
35
- url: "URL",
36
- emoji: "សញ្ញាអារម្មណ៍",
37
- uuid: "UUID",
38
- uuidv4: "UUIDv4",
39
- uuidv6: "UUIDv6",
40
- nanoid: "nanoid",
41
- guid: "GUID",
42
- cuid: "cuid",
43
- cuid2: "cuid2",
44
- ulid: "ULID",
45
- xid: "XID",
46
- ksuid: "KSUID",
47
- datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
48
- date: "កាលបរិច្ឆេទ ISO",
49
- time: "ម៉ោង ISO",
50
- duration: "រយៈពេល ISO",
51
- ipv4: "អាសយដ្ឋាន IPv4",
52
- ipv6: "អាសយដ្ឋាន IPv6",
53
- cidrv4: "ដែនអាសយដ្ឋាន IPv4",
54
- cidrv6: "ដែនអាសយដ្ឋាន IPv6",
55
- base64: "ខ្សែអក្សរអ៊ិកូដ base64",
56
- base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
57
- json_string: "ខ្សែអក្សរ JSON",
58
- e164: "លេខ E.164",
59
- jwt: "JWT",
60
- template_literal: "ទិន្នន័យបញ្ចូល",
61
- };
62
- return (issue) => {
63
- switch (issue.code) {
64
- case "invalid_type":
65
- return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
66
- case "invalid_value":
67
- if (issue.values.length === 1)
68
- return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
69
- return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
70
- case "too_big": {
71
- const adj = issue.inclusive ? "<=" : "<";
72
- const sizing = getSizing(issue.origin);
73
- if (sizing)
74
- return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
75
- return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
76
- }
77
- case "too_small": {
78
- const adj = issue.inclusive ? ">=" : ">";
79
- const sizing = getSizing(issue.origin);
80
- if (sizing) {
81
- return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
82
- }
83
- return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
84
- }
85
- case "invalid_format": {
86
- const _issue = issue;
87
- if (_issue.format === "starts_with") {
88
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
89
- }
90
- if (_issue.format === "ends_with")
91
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
92
- if (_issue.format === "includes")
93
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
94
- if (_issue.format === "regex")
95
- return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
96
- return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
97
- }
98
- case "not_multiple_of":
99
- return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
100
- case "unrecognized_keys":
101
- return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
102
- case "invalid_key":
103
- return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
104
- case "invalid_union":
105
- return `ទិន្នន័យមិនត្រឹមត្រូវ`;
106
- case "invalid_element":
107
- return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
108
- default:
109
- return `ទិន្នន័យមិនត្រឹមត្រូវ`;
110
- }
111
- };
112
- };
1
+ import km from "./km.js";
2
+ /** @deprecated Use `km` instead. */
113
3
  export default function () {
114
- return {
115
- localeError: error(),
116
- };
4
+ return km();
117
5
  }
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.default = default_1;
27
+ const util = __importStar(require("../core/util.cjs"));
28
+ const error = () => {
29
+ const Sizable = {
30
+ string: { unit: "តួអក្សរ", verb: "គួរមាន" },
31
+ file: { unit: "បៃ", verb: "គួរមាន" },
32
+ array: { unit: "ធាតុ", verb: "គួរមាន" },
33
+ set: { unit: "ធាតុ", verb: "គួរមាន" },
34
+ };
35
+ function getSizing(origin) {
36
+ return Sizable[origin] ?? null;
37
+ }
38
+ const parsedType = (data) => {
39
+ const t = typeof data;
40
+ switch (t) {
41
+ case "number": {
42
+ return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
43
+ }
44
+ case "object": {
45
+ if (Array.isArray(data)) {
46
+ return "អារេ (Array)";
47
+ }
48
+ if (data === null) {
49
+ return "គ្មានតម្លៃ (null)";
50
+ }
51
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
52
+ return data.constructor.name;
53
+ }
54
+ }
55
+ }
56
+ return t;
57
+ };
58
+ const Nouns = {
59
+ regex: "ទិន្នន័យបញ្ចូល",
60
+ email: "អាសយដ្ឋានអ៊ីមែល",
61
+ url: "URL",
62
+ emoji: "សញ្ញាអារម្មណ៍",
63
+ uuid: "UUID",
64
+ uuidv4: "UUIDv4",
65
+ uuidv6: "UUIDv6",
66
+ nanoid: "nanoid",
67
+ guid: "GUID",
68
+ cuid: "cuid",
69
+ cuid2: "cuid2",
70
+ ulid: "ULID",
71
+ xid: "XID",
72
+ ksuid: "KSUID",
73
+ datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
74
+ date: "កាលបរិច្ឆេទ ISO",
75
+ time: "ម៉ោង ISO",
76
+ duration: "រយៈពេល ISO",
77
+ ipv4: "អាសយដ្ឋាន IPv4",
78
+ ipv6: "អាសយដ្ឋាន IPv6",
79
+ cidrv4: "ដែនអាសយដ្ឋាន IPv4",
80
+ cidrv6: "ដែនអាសយដ្ឋាន IPv6",
81
+ base64: "ខ្សែអក្សរអ៊ិកូដ base64",
82
+ base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
83
+ json_string: "ខ្សែអក្សរ JSON",
84
+ e164: "លេខ E.164",
85
+ jwt: "JWT",
86
+ template_literal: "ទិន្នន័យបញ្ចូល",
87
+ };
88
+ return (issue) => {
89
+ switch (issue.code) {
90
+ case "invalid_type":
91
+ return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
92
+ case "invalid_value":
93
+ if (issue.values.length === 1)
94
+ return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
95
+ return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
96
+ case "too_big": {
97
+ const adj = issue.inclusive ? "<=" : "<";
98
+ const sizing = getSizing(issue.origin);
99
+ if (sizing)
100
+ return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
101
+ return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
102
+ }
103
+ case "too_small": {
104
+ const adj = issue.inclusive ? ">=" : ">";
105
+ const sizing = getSizing(issue.origin);
106
+ if (sizing) {
107
+ return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
108
+ }
109
+ return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
110
+ }
111
+ case "invalid_format": {
112
+ const _issue = issue;
113
+ if (_issue.format === "starts_with") {
114
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
115
+ }
116
+ if (_issue.format === "ends_with")
117
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
118
+ if (_issue.format === "includes")
119
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
120
+ if (_issue.format === "regex")
121
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
122
+ return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
123
+ }
124
+ case "not_multiple_of":
125
+ return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
126
+ case "unrecognized_keys":
127
+ return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
128
+ case "invalid_key":
129
+ return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
130
+ case "invalid_union":
131
+ return `ទិន្នន័យមិនត្រឹមត្រូវ`;
132
+ case "invalid_element":
133
+ return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
134
+ default:
135
+ return `ទិន្នន័យមិនត្រឹមត្រូវ`;
136
+ }
137
+ };
138
+ };
139
+ function default_1() {
140
+ return {
141
+ localeError: error(),
142
+ };
143
+ }
144
+ module.exports = exports.default;
@@ -0,0 +1,5 @@
1
+ import type * as errors from "../core/errors.cjs";
2
+ declare function _default(): {
3
+ localeError: errors.$ZodErrorMap;
4
+ };
5
+ export = _default;
@@ -0,0 +1,4 @@
1
+ import type * as errors from "../core/errors.js";
2
+ export default function (): {
3
+ localeError: errors.$ZodErrorMap;
4
+ };
@@ -0,0 +1,117 @@
1
+ import * as util from "../core/util.js";
2
+ const error = () => {
3
+ const Sizable = {
4
+ string: { unit: "តួអក្សរ", verb: "គួរមាន" },
5
+ file: { unit: "បៃ", verb: "គួរមាន" },
6
+ array: { unit: "ធាតុ", verb: "គួរមាន" },
7
+ set: { unit: "ធាតុ", verb: "គួរមាន" },
8
+ };
9
+ function getSizing(origin) {
10
+ return Sizable[origin] ?? null;
11
+ }
12
+ const parsedType = (data) => {
13
+ const t = typeof data;
14
+ switch (t) {
15
+ case "number": {
16
+ return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
17
+ }
18
+ case "object": {
19
+ if (Array.isArray(data)) {
20
+ return "អារេ (Array)";
21
+ }
22
+ if (data === null) {
23
+ return "គ្មានតម្លៃ (null)";
24
+ }
25
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
26
+ return data.constructor.name;
27
+ }
28
+ }
29
+ }
30
+ return t;
31
+ };
32
+ const Nouns = {
33
+ regex: "ទិន្នន័យបញ្ចូល",
34
+ email: "អាសយដ្ឋានអ៊ីមែល",
35
+ url: "URL",
36
+ emoji: "សញ្ញាអារម្មណ៍",
37
+ uuid: "UUID",
38
+ uuidv4: "UUIDv4",
39
+ uuidv6: "UUIDv6",
40
+ nanoid: "nanoid",
41
+ guid: "GUID",
42
+ cuid: "cuid",
43
+ cuid2: "cuid2",
44
+ ulid: "ULID",
45
+ xid: "XID",
46
+ ksuid: "KSUID",
47
+ datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
48
+ date: "កាលបរិច្ឆេទ ISO",
49
+ time: "ម៉ោង ISO",
50
+ duration: "រយៈពេល ISO",
51
+ ipv4: "អាសយដ្ឋាន IPv4",
52
+ ipv6: "អាសយដ្ឋាន IPv6",
53
+ cidrv4: "ដែនអាសយដ្ឋាន IPv4",
54
+ cidrv6: "ដែនអាសយដ្ឋាន IPv6",
55
+ base64: "ខ្សែអក្សរអ៊ិកូដ base64",
56
+ base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
57
+ json_string: "ខ្សែអក្សរ JSON",
58
+ e164: "លេខ E.164",
59
+ jwt: "JWT",
60
+ template_literal: "ទិន្នន័យបញ្ចូល",
61
+ };
62
+ return (issue) => {
63
+ switch (issue.code) {
64
+ case "invalid_type":
65
+ return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
66
+ case "invalid_value":
67
+ if (issue.values.length === 1)
68
+ return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
69
+ return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
70
+ case "too_big": {
71
+ const adj = issue.inclusive ? "<=" : "<";
72
+ const sizing = getSizing(issue.origin);
73
+ if (sizing)
74
+ return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
75
+ return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
76
+ }
77
+ case "too_small": {
78
+ const adj = issue.inclusive ? ">=" : ">";
79
+ const sizing = getSizing(issue.origin);
80
+ if (sizing) {
81
+ return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
82
+ }
83
+ return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
84
+ }
85
+ case "invalid_format": {
86
+ const _issue = issue;
87
+ if (_issue.format === "starts_with") {
88
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
89
+ }
90
+ if (_issue.format === "ends_with")
91
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
92
+ if (_issue.format === "includes")
93
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
94
+ if (_issue.format === "regex")
95
+ return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
96
+ return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
97
+ }
98
+ case "not_multiple_of":
99
+ return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
100
+ case "unrecognized_keys":
101
+ return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
102
+ case "invalid_key":
103
+ return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
104
+ case "invalid_union":
105
+ return `ទិន្នន័យមិនត្រឹមត្រូវ`;
106
+ case "invalid_element":
107
+ return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
108
+ default:
109
+ return `ទិន្នន័យមិនត្រឹមត្រូវ`;
110
+ }
111
+ };
112
+ };
113
+ export default function () {
114
+ return {
115
+ localeError: error(),
116
+ };
117
+ }