@hy_ong/zod-kit 0.1.16 → 0.2.0
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/CLAUDE.md +142 -0
- package/dist/index.cjs +1660 -4
- package/dist/index.d.cts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1660 -4
- package/package.json +1 -1
- package/src/config.ts +2 -2
- package/src/i18n/index.ts +18 -2
- package/src/i18n/locales/en-GB.json +204 -0
- package/src/i18n/locales/id-ID.json +204 -0
- package/src/i18n/locales/ja-JP.json +204 -0
- package/src/i18n/locales/ko-KR.json +204 -0
- package/src/i18n/locales/ms-MY.json +204 -0
- package/src/i18n/locales/th-TH.json +204 -0
- package/src/i18n/locales/vi-VN.json +204 -0
- package/src/i18n/locales/zh-CN.json +204 -0
- package/src/validators/common/boolean.ts +1 -1
- package/src/validators/common/date.ts +1 -1
- package/src/validators/common/datetime.ts +1 -1
- package/src/validators/common/email.ts +1 -1
- package/src/validators/common/file.ts +1 -1
- package/src/validators/common/id.ts +1 -1
- package/src/validators/common/number.ts +1 -1
- package/src/validators/common/password.ts +1 -1
- package/src/validators/common/text.ts +1 -1
- package/src/validators/common/time.ts +1 -1
- package/src/validators/common/url.ts +1 -1
- package/src/validators/taiwan/business-id.ts +1 -1
- package/src/validators/taiwan/fax.ts +1 -1
- package/src/validators/taiwan/mobile.ts +1 -1
- package/src/validators/taiwan/national-id.ts +1 -1
- package/src/validators/taiwan/postal-code.ts +1 -1
- package/src/validators/taiwan/tel.ts +1 -1
- package/tests/common/boolean.test.ts +6 -6
- package/tests/common/date.test.ts +8 -8
- package/tests/common/datetime.test.ts +7 -7
- package/tests/common/email.test.ts +6 -6
- package/tests/common/file.test.ts +6 -6
- package/tests/common/id.test.ts +5 -5
- package/tests/common/number.test.ts +6 -6
- package/tests/common/password.test.ts +5 -5
- package/tests/common/text.test.ts +7 -7
- package/tests/common/time.test.ts +7 -7
- package/tests/common/url.test.ts +10 -10
- package/tests/taiwan/business-id.test.ts +4 -4
- package/tests/taiwan/fax.test.ts +7 -7
- package/tests/taiwan/mobile.test.ts +7 -7
- package/tests/taiwan/national-id.test.ts +4 -4
- package/tests/taiwan/postal-code.test.ts +6 -6
- package/tests/taiwan/tel.test.ts +7 -7
- /package/src/i18n/locales/{en.json → en-US.json} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hy_ong/zod-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A comprehensive TypeScript library providing pre-built Zod validation schemas with full internationalization support for common data types and Taiwan-specific formats",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"zod",
|
package/src/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type Locale = "zh-TW" | "en"
|
|
1
|
+
export type Locale = "zh-TW" | "zh-CN" | "en-US" | "en-GB" | "ja-JP" | "ko-KR" | "ms-MY" | "id-ID" | "th-TH" | "vi-VN"
|
|
2
2
|
|
|
3
|
-
let currentLocale: Locale = "en"
|
|
3
|
+
let currentLocale: Locale = "en-US"
|
|
4
4
|
|
|
5
5
|
export const setLocale = (locale: Locale) => {
|
|
6
6
|
currentLocale = locale
|
package/src/i18n/index.ts
CHANGED
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
import zhTW from "./locales/zh-TW.json"
|
|
2
|
-
import
|
|
2
|
+
import zhCN from "./locales/zh-CN.json"
|
|
3
|
+
import enUS from "./locales/en-US.json"
|
|
4
|
+
import enGB from "./locales/en-GB.json"
|
|
5
|
+
import jaJP from "./locales/ja-JP.json"
|
|
6
|
+
import koKR from "./locales/ko-KR.json"
|
|
7
|
+
import msMY from "./locales/ms-MY.json"
|
|
8
|
+
import idID from "./locales/id-ID.json"
|
|
9
|
+
import thTH from "./locales/th-TH.json"
|
|
10
|
+
import viVN from "./locales/vi-VN.json"
|
|
3
11
|
import { getLocale } from "../config"
|
|
4
12
|
|
|
5
13
|
const dicts = {
|
|
6
14
|
"zh-TW": zhTW,
|
|
7
|
-
|
|
15
|
+
"zh-CN": zhCN,
|
|
16
|
+
"en-US": enUS,
|
|
17
|
+
"en-GB": enGB,
|
|
18
|
+
"ja-JP": jaJP,
|
|
19
|
+
"ko-KR": koKR,
|
|
20
|
+
"ms-MY": msMY,
|
|
21
|
+
"id-ID": idID,
|
|
22
|
+
"th-TH": thTH,
|
|
23
|
+
"vi-VN": viVN,
|
|
8
24
|
} satisfies Record<string, unknown>
|
|
9
25
|
|
|
10
26
|
export const t = (key: string, params: Record<string, any> = {}): string => {
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"boolean": {
|
|
4
|
+
"required": "Required",
|
|
5
|
+
"shouldBeTrue": "Must be True",
|
|
6
|
+
"shouldBeFalse": "Must be False",
|
|
7
|
+
"invalid": "Must be a boolean value"
|
|
8
|
+
},
|
|
9
|
+
"email": {
|
|
10
|
+
"required": "Required",
|
|
11
|
+
"invalid": "Invalid email format",
|
|
12
|
+
"minLength": "Must be at least ${minLength} characters",
|
|
13
|
+
"maxLength": "Must be at most ${maxLength} characters",
|
|
14
|
+
"includes": "Must include ${includes}",
|
|
15
|
+
"domain": "Must be from domain: ${domain}",
|
|
16
|
+
"domainBlacklist": "Domain ${domain} is not allowed",
|
|
17
|
+
"businessOnly": "Only business email addresses are allowed",
|
|
18
|
+
"noDisposable": "Disposable email addresses are not allowed"
|
|
19
|
+
},
|
|
20
|
+
"url": {
|
|
21
|
+
"required": "Required",
|
|
22
|
+
"invalid": "Invalid URL format",
|
|
23
|
+
"min": "Must be at least ${min} characters",
|
|
24
|
+
"max": "Must be at most ${max} characters",
|
|
25
|
+
"includes": "Must include ${includes}",
|
|
26
|
+
"excludes": "Must not contain ${excludes}",
|
|
27
|
+
"protocol": "Protocol must be one of: ${protocols}",
|
|
28
|
+
"domain": "Domain must be one of: ${domains}",
|
|
29
|
+
"domainBlacklist": "Domain ${domain} is not allowed",
|
|
30
|
+
"port": "Port must be one of: ${ports}",
|
|
31
|
+
"pathStartsWith": "Path must start with ${path}",
|
|
32
|
+
"pathEndsWith": "Path must end with ${path}",
|
|
33
|
+
"hasQuery": "URL must have query parameters",
|
|
34
|
+
"noQuery": "URL must not have query parameters",
|
|
35
|
+
"hasFragment": "URL must have a fragment",
|
|
36
|
+
"noFragment": "URL must not have a fragment",
|
|
37
|
+
"localhost": "Localhost URLs are not allowed",
|
|
38
|
+
"noLocalhost": "Localhost URLs are not allowed"
|
|
39
|
+
},
|
|
40
|
+
"password": {
|
|
41
|
+
"required": "Required",
|
|
42
|
+
"min": "Must be at least ${min} characters",
|
|
43
|
+
"max": "Must be at most ${max} characters",
|
|
44
|
+
"uppercase": "Must include at least one uppercase letter",
|
|
45
|
+
"lowercase": "Must include at least one lowercase letter",
|
|
46
|
+
"digits": "Must include at least one digit",
|
|
47
|
+
"special": "Must include at least one special character",
|
|
48
|
+
"noRepeating": "Must not contain repeating characters",
|
|
49
|
+
"noSequential": "Must not contain sequential characters",
|
|
50
|
+
"noCommonWords": "Must not contain common words or patterns",
|
|
51
|
+
"minStrength": "Password strength must be at least ${minStrength}",
|
|
52
|
+
"excludes": "Must not contain ${excludes}",
|
|
53
|
+
"includes": "Must include ${includes}",
|
|
54
|
+
"invalid": "Invalid password format"
|
|
55
|
+
},
|
|
56
|
+
"number": {
|
|
57
|
+
"required": "Required",
|
|
58
|
+
"invalid": "Must be a valid number",
|
|
59
|
+
"integer": "Must be an integer",
|
|
60
|
+
"float": "Must be a decimal number",
|
|
61
|
+
"min": "Must be at least ${min}",
|
|
62
|
+
"max": "Must be at most ${max}",
|
|
63
|
+
"positive": "Must be positive",
|
|
64
|
+
"negative": "Must be negative",
|
|
65
|
+
"nonNegative": "Must be non-negative",
|
|
66
|
+
"nonPositive": "Must be non-positive",
|
|
67
|
+
"multipleOf": "Must be a multiple of ${multipleOf}",
|
|
68
|
+
"finite": "Must be a finite number",
|
|
69
|
+
"precision": "Must have at most ${precision} decimal places"
|
|
70
|
+
},
|
|
71
|
+
"id": {
|
|
72
|
+
"required": "Required",
|
|
73
|
+
"invalid": "Invalid ID format",
|
|
74
|
+
"minLength": "Must be at least ${minLength} characters",
|
|
75
|
+
"maxLength": "Must be at most ${maxLength} characters",
|
|
76
|
+
"numeric": "Must be a numeric ID",
|
|
77
|
+
"uuid": "Must be a valid UUID",
|
|
78
|
+
"objectId": "Must be a valid MongoDB ObjectId",
|
|
79
|
+
"nanoid": "Must be a valid Nano ID",
|
|
80
|
+
"snowflake": "Must be a valid Snowflake ID",
|
|
81
|
+
"cuid": "Must be a valid CUID",
|
|
82
|
+
"ulid": "Must be a valid ULID",
|
|
83
|
+
"shortid": "Must be a valid Short ID",
|
|
84
|
+
"customFormat": "Invalid ID format",
|
|
85
|
+
"includes": "Must include ${includes}",
|
|
86
|
+
"excludes": "Must not contain ${excludes}",
|
|
87
|
+
"startsWith": "Must start with ${startsWith}",
|
|
88
|
+
"endsWith": "Must end with ${endsWith}"
|
|
89
|
+
},
|
|
90
|
+
"text": {
|
|
91
|
+
"required": "Required",
|
|
92
|
+
"notEmpty": "Cannot be empty or whitespace only",
|
|
93
|
+
"minLength": "Must be at least ${minLength} characters",
|
|
94
|
+
"maxLength": "Must be at most ${maxLength} characters",
|
|
95
|
+
"startsWith": "Must start with ${startsWith}",
|
|
96
|
+
"endsWith": "Must end with ${endsWith}",
|
|
97
|
+
"includes": "Must include ${includes}",
|
|
98
|
+
"excludes": "Must not contain ${excludes}",
|
|
99
|
+
"invalid": "Invalid format"
|
|
100
|
+
},
|
|
101
|
+
"date": {
|
|
102
|
+
"required": "Required",
|
|
103
|
+
"invalid": "Invalid date",
|
|
104
|
+
"format": "Must be in ${format} format",
|
|
105
|
+
"min": "Date must be on or after ${min}",
|
|
106
|
+
"max": "Date must be on or before ${max}",
|
|
107
|
+
"includes": "Must include ${includes}",
|
|
108
|
+
"excludes": "Must not contain ${excludes}",
|
|
109
|
+
"past": "Date must be in the past",
|
|
110
|
+
"future": "Date must be in the future",
|
|
111
|
+
"today": "Date must be today",
|
|
112
|
+
"notToday": "Date must not be today",
|
|
113
|
+
"weekday": "Date must be a weekday (Monday-Friday)",
|
|
114
|
+
"weekend": "Date must be a weekend (Saturday-Sunday)"
|
|
115
|
+
},
|
|
116
|
+
"time": {
|
|
117
|
+
"required": "Required",
|
|
118
|
+
"invalid": "Invalid time format",
|
|
119
|
+
"format": "Must be in ${format} format",
|
|
120
|
+
"min": "Time must be after ${min}",
|
|
121
|
+
"max": "Time must be before ${max}",
|
|
122
|
+
"hour": "Hour must be between ${minHour} and ${maxHour}",
|
|
123
|
+
"minute": "Minutes must be in ${minuteStep}-minute intervals",
|
|
124
|
+
"second": "Seconds must be in ${secondStep}-second intervals",
|
|
125
|
+
"includes": "Must include ${includes}",
|
|
126
|
+
"excludes": "Must not contain ${excludes}",
|
|
127
|
+
"customRegex": "Invalid time format",
|
|
128
|
+
"notInWhitelist": "Time is not in the allowed list"
|
|
129
|
+
},
|
|
130
|
+
"datetime": {
|
|
131
|
+
"required": "Required",
|
|
132
|
+
"invalid": "Invalid datetime format",
|
|
133
|
+
"format": "Must be in ${format} format",
|
|
134
|
+
"min": "DateTime must be after ${min}",
|
|
135
|
+
"max": "DateTime must be before ${max}",
|
|
136
|
+
"hour": "Hour must be between ${minHour} and ${maxHour}",
|
|
137
|
+
"minute": "Minutes must be in ${minuteStep}-minute intervals",
|
|
138
|
+
"includes": "Must include ${includes}",
|
|
139
|
+
"excludes": "Must not contain ${excludes}",
|
|
140
|
+
"past": "DateTime must be in the past",
|
|
141
|
+
"future": "DateTime must be in the future",
|
|
142
|
+
"today": "DateTime must be today",
|
|
143
|
+
"notToday": "DateTime must not be today",
|
|
144
|
+
"weekday": "DateTime must be a weekday (Monday-Friday)",
|
|
145
|
+
"weekend": "DateTime must be a weekend (Saturday-Sunday)",
|
|
146
|
+
"customRegex": "Invalid datetime format",
|
|
147
|
+
"notInWhitelist": "DateTime is not in the allowed list"
|
|
148
|
+
},
|
|
149
|
+
"file": {
|
|
150
|
+
"required": "Required",
|
|
151
|
+
"invalid": "Invalid file format",
|
|
152
|
+
"size": "File size must not exceed ${size}",
|
|
153
|
+
"minSize": "File size must be at least ${minSize}",
|
|
154
|
+
"maxSize": "File size must not exceed ${maxSize}",
|
|
155
|
+
"type": "File type must be one of: ${type}",
|
|
156
|
+
"extension": "File extension must be one of: ${extension}",
|
|
157
|
+
"extensionBlacklist": "File extension ${extension} is not allowed",
|
|
158
|
+
"name": "File name must match pattern ${pattern}",
|
|
159
|
+
"nameBlacklist": "File name must not match pattern ${pattern}",
|
|
160
|
+
"imageOnly": "Only image files are allowed",
|
|
161
|
+
"documentOnly": "Only document files are allowed",
|
|
162
|
+
"videoOnly": "Only video files are allowed",
|
|
163
|
+
"audioOnly": "Only audio files are allowed",
|
|
164
|
+
"archiveOnly": "Only archive files are allowed"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"taiwan": {
|
|
168
|
+
"businessId": {
|
|
169
|
+
"required": "Required",
|
|
170
|
+
"invalid": "Invalid Taiwan Business ID"
|
|
171
|
+
},
|
|
172
|
+
"nationalId": {
|
|
173
|
+
"required": "Required",
|
|
174
|
+
"invalid": "Invalid Taiwan National ID"
|
|
175
|
+
},
|
|
176
|
+
"mobile": {
|
|
177
|
+
"required": "Required",
|
|
178
|
+
"invalid": "Invalid Taiwan mobile phone format",
|
|
179
|
+
"notInWhitelist": "Not in allowed mobile phone list"
|
|
180
|
+
},
|
|
181
|
+
"tel": {
|
|
182
|
+
"required": "Required",
|
|
183
|
+
"invalid": "Invalid Taiwan telephone format",
|
|
184
|
+
"notInWhitelist": "Not in allowed telephone list"
|
|
185
|
+
},
|
|
186
|
+
"fax": {
|
|
187
|
+
"required": "Required",
|
|
188
|
+
"invalid": "Invalid Taiwan fax format",
|
|
189
|
+
"notInWhitelist": "Not in allowed fax list"
|
|
190
|
+
},
|
|
191
|
+
"postalCode": {
|
|
192
|
+
"required": "Required",
|
|
193
|
+
"invalid": "Invalid Taiwan postal code",
|
|
194
|
+
"invalidFormat": "Invalid postal code format",
|
|
195
|
+
"invalidRange": "Postal code is outside valid range",
|
|
196
|
+
"legacy5DigitWarning": "5-digit postal codes are legacy format, consider using 6-digit format",
|
|
197
|
+
"format3Only": "Only 3-digit postal codes are allowed",
|
|
198
|
+
"format5Only": "Only 5-digit postal codes are allowed",
|
|
199
|
+
"format6Only": "Only 6-digit postal codes are allowed",
|
|
200
|
+
"invalidSuffix": "Invalid postal code suffix - must be 01-99 for 5-digit or 001-999 for 6-digit codes",
|
|
201
|
+
"deprecated5Digit": "5-digit postal codes are deprecated and no longer supported"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
{
|
|
2
|
+
"common": {
|
|
3
|
+
"boolean": {
|
|
4
|
+
"required": "Wajib diisi",
|
|
5
|
+
"shouldBeTrue": "Harus True",
|
|
6
|
+
"shouldBeFalse": "Harus False",
|
|
7
|
+
"invalid": "Harus berupa nilai boolean"
|
|
8
|
+
},
|
|
9
|
+
"email": {
|
|
10
|
+
"required": "Wajib diisi",
|
|
11
|
+
"invalid": "Format email tidak valid",
|
|
12
|
+
"minLength": "Harus minimal ${minLength} karakter",
|
|
13
|
+
"maxLength": "Harus maksimal ${maxLength} karakter",
|
|
14
|
+
"includes": "Harus mengandung ${includes}",
|
|
15
|
+
"domain": "Harus dari domain: ${domain}",
|
|
16
|
+
"domainBlacklist": "Domain ${domain} tidak diizinkan",
|
|
17
|
+
"businessOnly": "Hanya alamat email bisnis yang diizinkan",
|
|
18
|
+
"noDisposable": "Alamat email sekali pakai tidak diizinkan"
|
|
19
|
+
},
|
|
20
|
+
"url": {
|
|
21
|
+
"required": "Wajib diisi",
|
|
22
|
+
"invalid": "Format URL tidak valid",
|
|
23
|
+
"min": "Harus minimal ${min} karakter",
|
|
24
|
+
"max": "Harus maksimal ${max} karakter",
|
|
25
|
+
"includes": "Harus mengandung ${includes}",
|
|
26
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
27
|
+
"protocol": "Protokol harus salah satu dari: ${protocols}",
|
|
28
|
+
"domain": "Domain harus salah satu dari: ${domains}",
|
|
29
|
+
"domainBlacklist": "Domain ${domain} tidak diizinkan",
|
|
30
|
+
"port": "Port harus salah satu dari: ${ports}",
|
|
31
|
+
"pathStartsWith": "Path harus dimulai dengan ${path}",
|
|
32
|
+
"pathEndsWith": "Path harus diakhiri dengan ${path}",
|
|
33
|
+
"hasQuery": "URL harus memiliki parameter query",
|
|
34
|
+
"noQuery": "URL tidak boleh memiliki parameter query",
|
|
35
|
+
"hasFragment": "URL harus memiliki fragmen",
|
|
36
|
+
"noFragment": "URL tidak boleh memiliki fragmen",
|
|
37
|
+
"localhost": "URL localhost tidak diizinkan",
|
|
38
|
+
"noLocalhost": "URL localhost tidak diizinkan"
|
|
39
|
+
},
|
|
40
|
+
"password": {
|
|
41
|
+
"required": "Wajib diisi",
|
|
42
|
+
"min": "Harus minimal ${min} karakter",
|
|
43
|
+
"max": "Harus maksimal ${max} karakter",
|
|
44
|
+
"uppercase": "Harus mengandung minimal satu huruf besar",
|
|
45
|
+
"lowercase": "Harus mengandung minimal satu huruf kecil",
|
|
46
|
+
"digits": "Harus mengandung minimal satu digit",
|
|
47
|
+
"special": "Harus mengandung minimal satu karakter khusus",
|
|
48
|
+
"noRepeating": "Tidak boleh mengandung karakter berulang",
|
|
49
|
+
"noSequential": "Tidak boleh mengandung karakter berurutan",
|
|
50
|
+
"noCommonWords": "Tidak boleh mengandung kata atau pola umum",
|
|
51
|
+
"minStrength": "Kekuatan kata sandi harus minimal ${minStrength}",
|
|
52
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
53
|
+
"includes": "Harus mengandung ${includes}",
|
|
54
|
+
"invalid": "Format kata sandi tidak valid"
|
|
55
|
+
},
|
|
56
|
+
"number": {
|
|
57
|
+
"required": "Wajib diisi",
|
|
58
|
+
"invalid": "Harus berupa angka yang valid",
|
|
59
|
+
"integer": "Harus berupa bilangan bulat",
|
|
60
|
+
"float": "Harus berupa bilangan desimal",
|
|
61
|
+
"min": "Harus minimal ${min}",
|
|
62
|
+
"max": "Harus maksimal ${max}",
|
|
63
|
+
"positive": "Harus positif",
|
|
64
|
+
"negative": "Harus negatif",
|
|
65
|
+
"nonNegative": "Harus non-negatif",
|
|
66
|
+
"nonPositive": "Harus non-positif",
|
|
67
|
+
"multipleOf": "Harus kelipatan dari ${multipleOf}",
|
|
68
|
+
"finite": "Harus berupa angka terhingga",
|
|
69
|
+
"precision": "Harus memiliki maksimal ${precision} tempat desimal"
|
|
70
|
+
},
|
|
71
|
+
"id": {
|
|
72
|
+
"required": "Wajib diisi",
|
|
73
|
+
"invalid": "Format ID tidak valid",
|
|
74
|
+
"minLength": "Harus minimal ${minLength} karakter",
|
|
75
|
+
"maxLength": "Harus maksimal ${maxLength} karakter",
|
|
76
|
+
"numeric": "Harus berupa ID numerik",
|
|
77
|
+
"uuid": "Harus berupa UUID yang valid",
|
|
78
|
+
"objectId": "Harus berupa MongoDB ObjectId yang valid",
|
|
79
|
+
"nanoid": "Harus berupa Nano ID yang valid",
|
|
80
|
+
"snowflake": "Harus berupa Snowflake ID yang valid",
|
|
81
|
+
"cuid": "Harus berupa CUID yang valid",
|
|
82
|
+
"ulid": "Harus berupa ULID yang valid",
|
|
83
|
+
"shortid": "Harus berupa Short ID yang valid",
|
|
84
|
+
"customFormat": "Format ID tidak valid",
|
|
85
|
+
"includes": "Harus mengandung ${includes}",
|
|
86
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
87
|
+
"startsWith": "Harus dimulai dengan ${startsWith}",
|
|
88
|
+
"endsWith": "Harus diakhiri dengan ${endsWith}"
|
|
89
|
+
},
|
|
90
|
+
"text": {
|
|
91
|
+
"required": "Wajib diisi",
|
|
92
|
+
"notEmpty": "Tidak boleh kosong atau hanya spasi",
|
|
93
|
+
"minLength": "Harus minimal ${minLength} karakter",
|
|
94
|
+
"maxLength": "Harus maksimal ${maxLength} karakter",
|
|
95
|
+
"startsWith": "Harus dimulai dengan ${startsWith}",
|
|
96
|
+
"endsWith": "Harus diakhiri dengan ${endsWith}",
|
|
97
|
+
"includes": "Harus mengandung ${includes}",
|
|
98
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
99
|
+
"invalid": "Format tidak valid"
|
|
100
|
+
},
|
|
101
|
+
"date": {
|
|
102
|
+
"required": "Wajib diisi",
|
|
103
|
+
"invalid": "Tanggal tidak valid",
|
|
104
|
+
"format": "Harus dalam format ${format}",
|
|
105
|
+
"min": "Tanggal harus pada atau setelah ${min}",
|
|
106
|
+
"max": "Tanggal harus pada atau sebelum ${max}",
|
|
107
|
+
"includes": "Harus mengandung ${includes}",
|
|
108
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
109
|
+
"past": "Tanggal harus di masa lalu",
|
|
110
|
+
"future": "Tanggal harus di masa depan",
|
|
111
|
+
"today": "Tanggal harus hari ini",
|
|
112
|
+
"notToday": "Tanggal tidak boleh hari ini",
|
|
113
|
+
"weekday": "Tanggal harus hari kerja (Senin-Jumat)",
|
|
114
|
+
"weekend": "Tanggal harus akhir pekan (Sabtu-Minggu)"
|
|
115
|
+
},
|
|
116
|
+
"time": {
|
|
117
|
+
"required": "Wajib diisi",
|
|
118
|
+
"invalid": "Format waktu tidak valid",
|
|
119
|
+
"format": "Harus dalam format ${format}",
|
|
120
|
+
"min": "Waktu harus setelah ${min}",
|
|
121
|
+
"max": "Waktu harus sebelum ${max}",
|
|
122
|
+
"hour": "Jam harus antara ${minHour} dan ${maxHour}",
|
|
123
|
+
"minute": "Menit harus dalam interval ${minuteStep} menit",
|
|
124
|
+
"second": "Detik harus dalam interval ${secondStep} detik",
|
|
125
|
+
"includes": "Harus mengandung ${includes}",
|
|
126
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
127
|
+
"customRegex": "Format waktu tidak valid",
|
|
128
|
+
"notInWhitelist": "Waktu tidak ada dalam daftar yang diizinkan"
|
|
129
|
+
},
|
|
130
|
+
"datetime": {
|
|
131
|
+
"required": "Wajib diisi",
|
|
132
|
+
"invalid": "Format tanggal waktu tidak valid",
|
|
133
|
+
"format": "Harus dalam format ${format}",
|
|
134
|
+
"min": "Tanggal waktu harus setelah ${min}",
|
|
135
|
+
"max": "Tanggal waktu harus sebelum ${max}",
|
|
136
|
+
"hour": "Jam harus antara ${minHour} dan ${maxHour}",
|
|
137
|
+
"minute": "Menit harus dalam interval ${minuteStep} menit",
|
|
138
|
+
"includes": "Harus mengandung ${includes}",
|
|
139
|
+
"excludes": "Tidak boleh mengandung ${excludes}",
|
|
140
|
+
"past": "Tanggal waktu harus di masa lalu",
|
|
141
|
+
"future": "Tanggal waktu harus di masa depan",
|
|
142
|
+
"today": "Tanggal waktu harus hari ini",
|
|
143
|
+
"notToday": "Tanggal waktu tidak boleh hari ini",
|
|
144
|
+
"weekday": "Tanggal waktu harus hari kerja (Senin-Jumat)",
|
|
145
|
+
"weekend": "Tanggal waktu harus akhir pekan (Sabtu-Minggu)",
|
|
146
|
+
"customRegex": "Format tanggal waktu tidak valid",
|
|
147
|
+
"notInWhitelist": "Tanggal waktu tidak ada dalam daftar yang diizinkan"
|
|
148
|
+
},
|
|
149
|
+
"file": {
|
|
150
|
+
"required": "Wajib diisi",
|
|
151
|
+
"invalid": "Format file tidak valid",
|
|
152
|
+
"size": "Ukuran file tidak boleh melebihi ${size}",
|
|
153
|
+
"minSize": "Ukuran file harus minimal ${minSize}",
|
|
154
|
+
"maxSize": "Ukuran file tidak boleh melebihi ${maxSize}",
|
|
155
|
+
"type": "Jenis file harus salah satu dari: ${type}",
|
|
156
|
+
"extension": "Ekstensi file harus salah satu dari: ${extension}",
|
|
157
|
+
"extensionBlacklist": "Ekstensi file ${extension} tidak diizinkan",
|
|
158
|
+
"name": "Nama file harus sesuai pola ${pattern}",
|
|
159
|
+
"nameBlacklist": "Nama file tidak boleh sesuai pola ${pattern}",
|
|
160
|
+
"imageOnly": "Hanya file gambar yang diizinkan",
|
|
161
|
+
"documentOnly": "Hanya file dokumen yang diizinkan",
|
|
162
|
+
"videoOnly": "Hanya file video yang diizinkan",
|
|
163
|
+
"audioOnly": "Hanya file audio yang diizinkan",
|
|
164
|
+
"archiveOnly": "Hanya file arsip yang diizinkan"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"taiwan": {
|
|
168
|
+
"businessId": {
|
|
169
|
+
"required": "Wajib diisi",
|
|
170
|
+
"invalid": "ID Bisnis Taiwan tidak valid"
|
|
171
|
+
},
|
|
172
|
+
"nationalId": {
|
|
173
|
+
"required": "Wajib diisi",
|
|
174
|
+
"invalid": "ID Nasional Taiwan tidak valid"
|
|
175
|
+
},
|
|
176
|
+
"mobile": {
|
|
177
|
+
"required": "Wajib diisi",
|
|
178
|
+
"invalid": "Format ponsel Taiwan tidak valid",
|
|
179
|
+
"notInWhitelist": "Tidak ada dalam daftar ponsel yang diizinkan"
|
|
180
|
+
},
|
|
181
|
+
"tel": {
|
|
182
|
+
"required": "Wajib diisi",
|
|
183
|
+
"invalid": "Format telepon rumah Taiwan tidak valid",
|
|
184
|
+
"notInWhitelist": "Tidak ada dalam daftar telepon rumah yang diizinkan"
|
|
185
|
+
},
|
|
186
|
+
"fax": {
|
|
187
|
+
"required": "Wajib diisi",
|
|
188
|
+
"invalid": "Format faks Taiwan tidak valid",
|
|
189
|
+
"notInWhitelist": "Tidak ada dalam daftar faks yang diizinkan"
|
|
190
|
+
},
|
|
191
|
+
"postalCode": {
|
|
192
|
+
"required": "Wajib diisi",
|
|
193
|
+
"invalid": "Kode pos Taiwan tidak valid",
|
|
194
|
+
"invalidFormat": "Format kode pos tidak valid",
|
|
195
|
+
"invalidRange": "Kode pos di luar rentang yang valid",
|
|
196
|
+
"legacy5DigitWarning": "Kode pos 5 digit adalah format lama, pertimbangkan untuk menggunakan format 6 digit",
|
|
197
|
+
"format3Only": "Hanya kode pos 3 digit yang diizinkan",
|
|
198
|
+
"format5Only": "Hanya kode pos 5 digit yang diizinkan",
|
|
199
|
+
"format6Only": "Hanya kode pos 6 digit yang diizinkan",
|
|
200
|
+
"invalidSuffix": "Akhiran kode pos tidak valid - harus 01-99 untuk 5 digit atau 001-999 untuk 6 digit",
|
|
201
|
+
"deprecated5Digit": "Kode pos 5 digit sudah tidak digunakan dan tidak lagi didukung"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|