koatty_validation 1.6.1 β 1.6.6
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/.rollup.config.js +10 -4
- package/.turbo/turbo-build.log +171 -0
- package/.turbo/turbo-test.log +8 -0
- package/CHANGELOG.md +59 -26
- package/dist/index.d.ts +29 -9
- package/dist/index.js +228 -204
- package/dist/index.mjs +228 -204
- package/dist/package.json +10 -14
- package/package.json +21 -26
package/.rollup.config.js
CHANGED
|
@@ -29,9 +29,12 @@ export default [
|
|
|
29
29
|
compilerOptions: {
|
|
30
30
|
declaration: false,
|
|
31
31
|
declarationMap: false,
|
|
32
|
-
module: "ESNext"
|
|
32
|
+
module: "ESNext",
|
|
33
|
+
skipLibCheck: true
|
|
33
34
|
}
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
useTsconfigDeclarationDir: false,
|
|
37
|
+
check: false
|
|
35
38
|
})
|
|
36
39
|
]
|
|
37
40
|
},
|
|
@@ -54,9 +57,12 @@ export default [
|
|
|
54
57
|
compilerOptions: {
|
|
55
58
|
declaration: false,
|
|
56
59
|
declarationMap: false,
|
|
57
|
-
module: "ESNext"
|
|
60
|
+
module: "ESNext",
|
|
61
|
+
skipLibCheck: true
|
|
58
62
|
}
|
|
59
|
-
}
|
|
63
|
+
},
|
|
64
|
+
useTsconfigDeclarationDir: false,
|
|
65
|
+
check: false
|
|
60
66
|
})
|
|
61
67
|
]
|
|
62
68
|
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
> koatty_validation@1.6.6 build /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-validation
|
|
4
|
+
> npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
> koatty_validation@1.6.6 build:js
|
|
8
|
+
> del-cli --force dist && npx rollup --bundleConfigAsCjs -c .rollup.config.js
|
|
9
|
+
|
|
10
|
+
[1G[0K[1G[0Kβ [1G[0K[36m
|
|
11
|
+
[1m./src/index.ts[22m β [1m./dist/index.js[22m...[39m
|
|
12
|
+
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
13
|
+
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
14
|
+
[1mlru-cache[22m (imported by "src/performance-cache.ts")
|
|
15
|
+
[1mreflect-metadata[22m (imported by "src/util.ts")
|
|
16
|
+
[1mkoatty_lib[22m (imported by "src/util.ts", "src/rule.ts" and "src/decorators.ts")
|
|
17
|
+
[1mkoatty_container[22m (imported by "src/util.ts" and "src/decorators.ts")
|
|
18
|
+
[1mclass-validator[22m (imported by "src/rule.ts", "src/decorator-factory.ts" and "src/decorators.ts")
|
|
19
|
+
[32mcreated [1m./dist/index.js[22m in [1m7.8s[22m[39m
|
|
20
|
+
[36m
|
|
21
|
+
[1m./src/index.ts[22m β [1m./dist/index.mjs[22m...[39m
|
|
22
|
+
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
23
|
+
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
24
|
+
[1mlru-cache[22m (imported by "src/performance-cache.ts")
|
|
25
|
+
[1mreflect-metadata[22m (imported by "src/util.ts")
|
|
26
|
+
[1mkoatty_lib[22m (imported by "src/util.ts", "src/rule.ts" and "src/decorators.ts")
|
|
27
|
+
[1mkoatty_container[22m (imported by "src/util.ts" and "src/decorators.ts")
|
|
28
|
+
[1mclass-validator[22m (imported by "src/rule.ts", "src/decorator-factory.ts" and "src/decorators.ts")
|
|
29
|
+
[32mcreated [1m./dist/index.mjs[22m in [1m2.3s[22m[39m
|
|
30
|
+
[1G[0Kβ [1G[0K[1G[0Kβ [1G[0K
|
|
31
|
+
> koatty_validation@1.6.6 build:dts
|
|
32
|
+
> bash ../../scripts/build-dts.sh
|
|
33
|
+
|
|
34
|
+
[1G[0Kπ¨ Building type declarations for koatty-validation...
|
|
35
|
+
β³ Waiting for dependencies to be ready...
|
|
36
|
+
|
|
37
|
+
π Checking dependencies: koatty_container, koatty_lib, koatty_logger
|
|
38
|
+
β³ Waiting for: koatty_container, koatty_lib, koatty_logger (0s)
|
|
39
|
+
β koatty_container: not found
|
|
40
|
+
β koatty_lib: not found
|
|
41
|
+
β koatty_logger: not found
|
|
42
|
+
β koatty_lib type declarations ready
|
|
43
|
+
β³ Waiting for: koatty_container, koatty_logger (5s)
|
|
44
|
+
β koatty_container: not found
|
|
45
|
+
β koatty_logger: not found
|
|
46
|
+
β³ Waiting for: koatty_container, koatty_logger (10s)
|
|
47
|
+
β koatty_container: not found
|
|
48
|
+
β koatty_logger: not found
|
|
49
|
+
β³ Waiting for: koatty_container, koatty_logger (15s)
|
|
50
|
+
β koatty_container: not found
|
|
51
|
+
β koatty_logger: not found
|
|
52
|
+
β³ Waiting for: koatty_container, koatty_logger (20s)
|
|
53
|
+
β koatty_container: not found
|
|
54
|
+
β koatty_logger: not found
|
|
55
|
+
β³ Waiting for: koatty_container, koatty_logger (25s)
|
|
56
|
+
β koatty_container: not found
|
|
57
|
+
β koatty_logger: not found
|
|
58
|
+
β³ Waiting for: koatty_container, koatty_logger (30s)
|
|
59
|
+
β koatty_container: not found
|
|
60
|
+
β koatty_logger: not found
|
|
61
|
+
β³ Waiting for: koatty_container, koatty_logger (35s)
|
|
62
|
+
β koatty_container: not found
|
|
63
|
+
β koatty_logger: not found
|
|
64
|
+
β³ Waiting for: koatty_container, koatty_logger (40s)
|
|
65
|
+
β koatty_container: not found
|
|
66
|
+
β koatty_logger: not found
|
|
67
|
+
β³ Waiting for: koatty_container, koatty_logger (45s)
|
|
68
|
+
β koatty_container: not found
|
|
69
|
+
β koatty_logger: not found
|
|
70
|
+
β³ Waiting for: koatty_container, koatty_logger (50s)
|
|
71
|
+
β koatty_container: not found
|
|
72
|
+
β koatty_logger: not found
|
|
73
|
+
β³ Waiting for: koatty_container, koatty_logger (55s)
|
|
74
|
+
β koatty_container: not found
|
|
75
|
+
β koatty_logger: not found
|
|
76
|
+
|
|
77
|
+
β οΈ Timeout waiting for dependencies: koatty_container, koatty_logger
|
|
78
|
+
Maximum wait time: 60000ms
|
|
79
|
+
Continuing build anyway - dependencies may be building in parallel
|
|
80
|
+
π Running TypeScript compiler...
|
|
81
|
+
[1G[0Kβ [1G[0K[1G[0Kβ [1G[0Kπ¦ Running API Extractor...
|
|
82
|
+
[1G[0Kβ [1G[0Kβ Ή[1G[0K
|
|
83
|
+
[1mapi-extractor 7.55.2 [36m - https://api-extractor.com/[39m
|
|
84
|
+
[22m
|
|
85
|
+
Using configuration from ./api-extractor.json
|
|
86
|
+
Analysis will use the bundled TypeScript version 5.8.2
|
|
87
|
+
*** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor.
|
|
88
|
+
[36mWriting: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-validation/temp/koatty_validation.api.json[39m
|
|
89
|
+
[36mWriting package typings: /Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-validation/dist/index.d.ts[39m
|
|
90
|
+
[33mWarning: src/error-handler.ts:185:6 - (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration[39m
|
|
91
|
+
[33mWarning: src/performance-cache.ts:410:14 - (ae-forgotten-export) The symbol "MetadataCache" needs to be exported by the entry point index.d.ts[39m
|
|
92
|
+
[33mWarning: src/performance-cache.ts:411:14 - (ae-forgotten-export) The symbol "ValidationCache" needs to be exported by the entry point index.d.ts[39m
|
|
93
|
+
[33mWarning: src/performance-cache.ts:412:14 - (ae-forgotten-export) The symbol "RegexCache" needs to be exported by the entry point index.d.ts[39m
|
|
94
|
+
[33mWarning: src/performance-cache.ts:413:14 - (ae-forgotten-export) The symbol "PerformanceMonitor" needs to be exported by the entry point index.d.ts[39m
|
|
95
|
+
[33mWarning: src/rule.ts:28:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
96
|
+
[33mWarning: src/rule.ts:29:17 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
97
|
+
[33mWarning: src/rule.ts:29:10 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
98
|
+
[33mWarning: src/rule.ts:29:4 - (tsdoc-undefined-tag) The TSDoc tag "@enum" is not defined in this configuration[39m
|
|
99
|
+
[33mWarning: src/rule.ts:54:6 - (tsdoc-undefined-tag) The TSDoc tag "@static" is not defined in this configuration[39m
|
|
100
|
+
[33mWarning: src/rule.ts:56:6 - (tsdoc-undefined-tag) The TSDoc tag "@memberof" is not defined in this configuration[39m
|
|
101
|
+
[33mWarning: src/rule.ts:65:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
102
|
+
[33mWarning: src/rule.ts:66:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
103
|
+
[33mWarning: src/rule.ts:67:23 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.[39m
|
|
104
|
+
[33mWarning: src/rule.ts:67:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
105
|
+
[33mWarning: src/rule.ts:68:33 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.[39m
|
|
106
|
+
[33mWarning: src/rule.ts:68:13 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
107
|
+
[33mWarning: src/rule.ts:69:28 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
108
|
+
[33mWarning: src/rule.ts:69:15 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
109
|
+
[33mWarning: src/rule.ts:70:6 - (tsdoc-undefined-tag) The TSDoc tag "@memberof" is not defined in this configuration[39m
|
|
110
|
+
[33mWarning: src/rule.ts:111:14 - (ae-forgotten-export) The symbol "ValidateClass" needs to be exported by the entry point index.d.ts[39m
|
|
111
|
+
[33mWarning: src/rule.ts:116:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
112
|
+
[33mWarning: src/rule.ts:117:17 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
113
|
+
[33mWarning: src/rule.ts:117:10 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
114
|
+
[33mWarning: src/rule.ts:117:4 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration[39m
|
|
115
|
+
[33mWarning: src/rule.ts:152:64 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
116
|
+
[33mWarning: src/rule.ts:152:63 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
117
|
+
[33mWarning: src/rule.ts:339:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
118
|
+
[33mWarning: src/types.ts:58:6 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration[39m
|
|
119
|
+
[33mWarning: src/types.ts:64:6 - (tsdoc-undefined-tag) The TSDoc tag "@default" is not defined in this configuration[39m
|
|
120
|
+
[33mWarning: src/util.ts:144:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration[39m
|
|
121
|
+
[33mWarning: src/util.ts:145:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
122
|
+
[33mWarning: src/util.ts:146:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
123
|
+
[33mWarning: src/util.ts:147:21 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets.[39m
|
|
124
|
+
[33mWarning: src/util.ts:147:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
125
|
+
[33mWarning: src/util.ts:226:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
126
|
+
[33mWarning: src/util.ts:227:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
127
|
+
[33mWarning: src/util.ts:228:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
128
|
+
[33mWarning: src/util.ts:228:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
129
|
+
[33mWarning: src/util.ts:252:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
130
|
+
[33mWarning: src/util.ts:253:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
131
|
+
[33mWarning: src/util.ts:254:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
132
|
+
[33mWarning: src/util.ts:254:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
133
|
+
[33mWarning: src/util.ts:323:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
134
|
+
[33mWarning: src/util.ts:324:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}'[39m
|
|
135
|
+
[33mWarning: src/util.ts:325:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag[39m
|
|
136
|
+
[33mWarning: src/util.ts:325:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@"[39m
|
|
137
|
+
|
|
138
|
+
API Extractor completed successfully
|
|
139
|
+
[1G[0Kβ [1G[0Kβ
Type declarations built successfully
|
|
140
|
+
[1G[0Kβ [1G[0K
|
|
141
|
+
> koatty_validation@1.6.6 build:doc
|
|
142
|
+
> del-cli --force docs/api && npx api-documenter markdown --input temp --output docs/api
|
|
143
|
+
|
|
144
|
+
[1G[0K[1G[0Kβ [1G[0K
|
|
145
|
+
[1mapi-documenter 7.28.2 [36m - https://api-extractor.com/[39m
|
|
146
|
+
[22m
|
|
147
|
+
Reading koatty_validation.api.json
|
|
148
|
+
|
|
149
|
+
Deleting old output from docs/api
|
|
150
|
+
Writing koatty_validation package
|
|
151
|
+
Unsupported block tag: @export
|
|
152
|
+
Unsupported block tag: @export
|
|
153
|
+
Unsupported block tag: @enum
|
|
154
|
+
Unsupported block tag: @export
|
|
155
|
+
Unsupported block tag: @default
|
|
156
|
+
Unsupported block tag: @default
|
|
157
|
+
Unsupported block tag: @default
|
|
158
|
+
Unsupported block tag: @default
|
|
159
|
+
Unsupported block tag: @export
|
|
160
|
+
Unsupported block tag: @type
|
|
161
|
+
Unsupported block tag: @export
|
|
162
|
+
Unsupported block tag: @enum
|
|
163
|
+
Unsupported block tag: @export
|
|
164
|
+
Unsupported block tag: @export
|
|
165
|
+
Unsupported block tag: @export
|
|
166
|
+
Unsupported block tag: @type
|
|
167
|
+
[1G[0Kβ [1G[0K[1G[0Kβ [1G[0K
|
|
168
|
+
> koatty_validation@1.6.6 build:cp
|
|
169
|
+
> node scripts/postBuild && copyfiles package.json LICENSE README.md dist/
|
|
170
|
+
|
|
171
|
+
[1G[0K[1G[0Kβ [1G[0K
|
package/CHANGELOG.md
CHANGED
|
@@ -1,94 +1,127 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- build
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- koatty_container@1.17.4
|
|
10
|
+
- koatty_lib@1.4.5
|
|
11
|
+
- koatty_logger@2.3.4
|
|
12
|
+
|
|
13
|
+
## 1.6.5
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- build
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
- koatty_container@1.17.3
|
|
20
|
+
- koatty_lib@1.4.4
|
|
21
|
+
- koatty_logger@2.3.3
|
|
22
|
+
|
|
23
|
+
## 1.6.4
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- build
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
- koatty_container@1.17.2
|
|
30
|
+
- koatty_lib@1.4.3
|
|
31
|
+
- koatty_logger@2.3.2
|
|
32
|
+
|
|
33
|
+
## 1.6.3
|
|
34
|
+
|
|
35
|
+
### Patch Changes
|
|
36
|
+
|
|
37
|
+
- Updated dependencies
|
|
38
|
+
- koatty_lib@1.4.2
|
|
39
|
+
- koatty_container@1.17.1
|
|
40
|
+
- koatty_logger@2.3.1
|
|
41
|
+
|
|
42
|
+
## 1.6.2
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- build
|
|
47
|
+
|
|
3
48
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
49
|
|
|
5
50
|
### [1.6.1](https://github.com/koatty/koatty_validation/compare/v1.6.0...v1.6.1) (2025-10-23)
|
|
6
51
|
|
|
7
52
|
## [1.6.0](https://github.com/koatty/koatty_validation/compare/v1.5.0...v1.6.0) (2025-10-22)
|
|
8
53
|
|
|
9
|
-
|
|
10
54
|
### Features
|
|
11
55
|
|
|
12
|
-
|
|
56
|
+
- improve validation with instance conversion and caching ([9865b93](https://github.com/koatty/koatty_validation/commit/9865b93e469a7df16fe67e0b85dab3191437b0a8))
|
|
13
57
|
|
|
14
58
|
## [1.5.0](https://github.com/koatty/koatty_validation/compare/v1.4.0...v1.5.0) (2025-10-22)
|
|
15
59
|
|
|
16
|
-
|
|
17
60
|
### Features
|
|
18
61
|
|
|
19
|
-
|
|
62
|
+
- comprehensive code optimization and enhancements ([f7ac738](https://github.com/koatty/koatty_validation/commit/f7ac7381a75a12365aee2a83530a12044c5e1d44))
|
|
20
63
|
|
|
21
64
|
## [1.4.0](https://github.com/koatty/koatty_validation/compare/v1.3.2...v1.4.0) (2025-06-10)
|
|
22
65
|
|
|
23
|
-
|
|
24
66
|
### Features
|
|
25
67
|
|
|
26
|
-
|
|
68
|
+
- add validation examples and decorator factory ([d448709](https://github.com/koatty/koatty_validation/commit/d44870987a808cd43c5a7ed5fabd5ca43162d0b6))
|
|
27
69
|
|
|
28
70
|
### [1.3.2](https://github.com/koatty/koatty_validation/compare/v1.3.1...v1.3.2) (2024-01-14)
|
|
29
71
|
|
|
30
|
-
|
|
31
72
|
### Bug Fixes
|
|
32
73
|
|
|
33
|
-
|
|
74
|
+
- deps ([6da3e43](https://github.com/koatty/koatty_validation/commit/6da3e437c946c9de2fc45f5319768fef0c4609b0))
|
|
34
75
|
|
|
35
76
|
### [1.3.1](https://github.com/koatty/koatty_validation/compare/v1.3.0...v1.3.1) (2024-01-07)
|
|
36
77
|
|
|
37
|
-
|
|
38
78
|
### Bug Fixes
|
|
39
79
|
|
|
40
|
-
|
|
41
|
-
|
|
80
|
+
- comment ([d898cf6](https://github.com/koatty/koatty_validation/commit/d898cf68bc8693f78155b7208b419dc4b11dffb4))
|
|
81
|
+
- dto θ΅εΌη±»ε ([5a1d68d](https://github.com/koatty/koatty_validation/commit/5a1d68dea0b67e988427c54abae9bfe76a6eaf48))
|
|
42
82
|
|
|
43
83
|
## [1.3.0](https://github.com/koatty/koatty_validation/compare/v1.2.10...v1.3.0) (2024-01-03)
|
|
44
84
|
|
|
45
|
-
|
|
46
85
|
### Features
|
|
47
86
|
|
|
48
|
-
|
|
49
|
-
|
|
87
|
+
- ε’ε @CheckFunc ([d5bdc2d](https://github.com/koatty/koatty_validation/commit/d5bdc2d51cdbf6d558e376bfda51e126158d4e75))
|
|
50
88
|
|
|
51
89
|
### Bug Fixes
|
|
52
90
|
|
|
53
|
-
|
|
91
|
+
- export ValidFuncs ([7d42023](https://github.com/koatty/koatty_validation/commit/7d42023138e9577c9646423c4c38faffba46fb10))
|
|
54
92
|
|
|
55
93
|
### [1.2.10](https://github.com/koatty/koatty_validation/compare/v1.2.9...v1.2.10) (2023-12-16)
|
|
56
94
|
|
|
57
|
-
|
|
58
95
|
### Bug Fixes
|
|
59
96
|
|
|
60
|
-
|
|
97
|
+
- assign dto property ([2357642](https://github.com/koatty/koatty_validation/commit/2357642f6ac1479c839454d40ec4bd89f3fbd7b2))
|
|
61
98
|
|
|
62
99
|
### [1.2.9](https://github.com/koatty/koatty_validation/compare/v1.2.8...v1.2.9) (2023-09-01)
|
|
63
100
|
|
|
64
101
|
### [1.2.8](https://github.com/koatty/koatty_validation/compare/v1.2.7...v1.2.8) (2023-02-17)
|
|
65
102
|
|
|
66
|
-
|
|
67
103
|
### Bug Fixes
|
|
68
104
|
|
|
69
|
-
|
|
105
|
+
- convert type ([924449d](https://github.com/koatty/koatty_validation/commit/924449d9f5fd7b14cbe3c1532f96416e69cc4eed))
|
|
70
106
|
|
|
71
107
|
### [1.2.7](https://github.com/koatty/koatty_validation/compare/v1.2.6...v1.2.7) (2023-02-17)
|
|
72
108
|
|
|
73
|
-
|
|
74
109
|
### Bug Fixes
|
|
75
110
|
|
|
76
|
-
|
|
77
|
-
|
|
111
|
+
- add script ([ca82c14](https://github.com/koatty/koatty_validation/commit/ca82c14b0a2226024fb2c4476ba7353be7a2f65a))
|
|
112
|
+
- plainToClass convert type ([06ed46e](https://github.com/koatty/koatty_validation/commit/06ed46e21ce191dc1c9f5c18ee7d029e9b6d4abf))
|
|
78
113
|
|
|
79
114
|
### [1.2.6](https://github.com/koatty/koatty_validation/compare/v1.2.5...v1.2.6) (2023-01-09)
|
|
80
115
|
|
|
81
|
-
|
|
82
116
|
### Bug Fixes
|
|
83
117
|
|
|
84
|
-
|
|
118
|
+
- err msg ([18632d4](https://github.com/koatty/koatty_validation/commit/18632d4c9b05b1d117be7f8170da0ce014018ab8))
|
|
85
119
|
|
|
86
120
|
### [1.2.5](https://github.com/koatty/koatty_validation/compare/v1.2.4...v1.2.5) (2022-08-19)
|
|
87
121
|
|
|
88
|
-
|
|
89
122
|
### Bug Fixes
|
|
90
123
|
|
|
91
|
-
|
|
124
|
+
- merge ([52c65f4](https://github.com/koatty/koatty_validation/commit/52c65f41c46a02a3fc5735e6e22ee6a3ed5337f8))
|
|
92
125
|
|
|
93
126
|
### [1.2.4](https://github.com/koatty/koatty_validation/compare/v1.2.3...v1.2.4) (2022-05-27)
|
|
94
127
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @Author: richen
|
|
3
|
-
* @Date:
|
|
3
|
+
* @Date: 2026-01-28 17:22:16
|
|
4
4
|
* @License: BSD (3-Clause)
|
|
5
5
|
* @Copyright (c) - <richenlin(at)gmail.com>
|
|
6
6
|
* @HomePage: https://koatty.org/
|
|
7
7
|
*/
|
|
8
8
|
import { CountryCode } from 'libphonenumber-js';
|
|
9
|
-
import { ValidationOptions } from 'class-validator';
|
|
9
|
+
import { ValidationOptions as ValidationOptions_2 } from 'class-validator';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* ηΌεθ£
ι₯°ε¨ - η¨δΊηΌειͺθ―ε½ζ°η»ζ
|
|
@@ -120,7 +120,7 @@ export declare function createValidationErrors(errors: Array<{
|
|
|
120
120
|
constraint: string;
|
|
121
121
|
message?: string;
|
|
122
122
|
context?: Record<string, any>;
|
|
123
|
-
}
|
|
123
|
+
}>, separator?: string): KoattyValidationError;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Decorator options
|
|
@@ -296,7 +296,7 @@ export declare const IsDate: (...args: any[]) => (object: Object, propertyName:
|
|
|
296
296
|
*/
|
|
297
297
|
export declare function IsDefined(): PropertyDecorator;
|
|
298
298
|
|
|
299
|
-
export declare function IsEmail(options?: IsEmailOptions, validationOptions?:
|
|
299
|
+
export declare function IsEmail(options?: IsEmailOptions | ValidationOptions_2, validationOptions?: ValidationOptions_2): (object: Object, propertyName: string) => void;
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
302
|
* koatty_validation type definitions
|
|
@@ -314,13 +314,13 @@ export declare interface IsEmailOptions {
|
|
|
314
314
|
require_tld?: boolean;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
export declare function IsHash(algorithm: HashAlgorithm, validationOptions?:
|
|
317
|
+
export declare function IsHash(algorithm: HashAlgorithm, validationOptions?: ValidationOptions_2): (object: Object, propertyName: string) => void;
|
|
318
318
|
|
|
319
319
|
export declare const IsIdNumber: (...args: any[]) => (object: Object, propertyName: string) => void;
|
|
320
320
|
|
|
321
321
|
export declare const IsIn: (...args: any[]) => (object: Object, propertyName: string) => void;
|
|
322
322
|
|
|
323
|
-
export declare function IsIP(version?: any, validationOptions?:
|
|
323
|
+
export declare function IsIP(version?: any, validationOptions?: ValidationOptions_2): (object: Object, propertyName: string) => void;
|
|
324
324
|
|
|
325
325
|
export declare const IsMobile: (...args: any[]) => (object: Object, propertyName: string) => void;
|
|
326
326
|
|
|
@@ -328,11 +328,11 @@ export declare const IsNotEmpty: (...args: any[]) => (object: Object, propertyNa
|
|
|
328
328
|
|
|
329
329
|
export declare const IsNotIn: (...args: any[]) => (object: Object, propertyName: string) => void;
|
|
330
330
|
|
|
331
|
-
export declare function IsPhoneNumber(region?: CountryCode, validationOptions?:
|
|
331
|
+
export declare function IsPhoneNumber(region?: CountryCode, validationOptions?: ValidationOptions_2): (object: Object, propertyName: string) => void;
|
|
332
332
|
|
|
333
333
|
export declare const IsPlateNumber: (...args: any[]) => (object: Object, propertyName: string) => void;
|
|
334
334
|
|
|
335
|
-
export declare function IsUrl(options?: IsURLOptions, validationOptions?:
|
|
335
|
+
export declare function IsUrl(options?: IsURLOptions, validationOptions?: ValidationOptions_2): (object: Object, propertyName: string) => void;
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
338
|
* URL validation options
|
|
@@ -568,10 +568,11 @@ declare class ValidateClass {
|
|
|
568
568
|
* @param {*} Clazz
|
|
569
569
|
* @param {*} data
|
|
570
570
|
* @param {boolean} [convert=false] auto convert parameters type
|
|
571
|
+
* @param {ValidationOptions} [options] validation options (returnAllErrors, errorSeparator)
|
|
571
572
|
* @returns {Promise<any>}
|
|
572
573
|
* @memberof ValidateClass
|
|
573
574
|
*/
|
|
574
|
-
valid(Clazz: any, data: any, convert?: boolean): Promise<any>;
|
|
575
|
+
valid(Clazz: any, data: any, convert?: boolean, options?: ValidationOptions): Promise<any>;
|
|
575
576
|
}
|
|
576
577
|
|
|
577
578
|
/**
|
|
@@ -647,6 +648,25 @@ export declare interface ValidationErrorDetail {
|
|
|
647
648
|
context?: Record<string, any>;
|
|
648
649
|
}
|
|
649
650
|
|
|
651
|
+
/**
|
|
652
|
+
* Parameter type key constant
|
|
653
|
+
*/
|
|
654
|
+
/**
|
|
655
|
+
* Validation options for ClassValidator.valid()
|
|
656
|
+
*/
|
|
657
|
+
export declare interface ValidationOptions {
|
|
658
|
+
/**
|
|
659
|
+
* Whether to return all validation errors or only the first one
|
|
660
|
+
* @default false (backward compatibility - returns only first error)
|
|
661
|
+
*/
|
|
662
|
+
returnAllErrors?: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* Separator for joining multiple error messages
|
|
665
|
+
* @default '; '
|
|
666
|
+
*/
|
|
667
|
+
errorSeparator?: string;
|
|
668
|
+
}
|
|
669
|
+
|
|
650
670
|
/**
|
|
651
671
|
* Validator function type definition
|
|
652
672
|
*/
|