@midwayjs/validate 4.0.0-alpha.1 → 4.0.0-beta.1

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/README.md CHANGED
@@ -9,4 +9,4 @@ Document: [https://midwayjs.org](https://midwayjs.org)
9
9
 
10
10
  ## License
11
11
 
12
- [MIT]((http://github.com/midwayjs/midway/blob/master/LICENSE))
12
+ [MIT]((https://github.com/midwayjs/midway/blob/master/LICENSE))
@@ -31,12 +31,6 @@ let ValidateConfiguration = class ValidateConfiguration {
31
31
  await container.getAsync(pipe_1.ParseBoolPipe);
32
32
  await container.getAsync(pipe_1.ParseFloatPipe);
33
33
  await container.getAsync(pipe_1.DecoratorValidPipe);
34
- this.decoratorService.registerParameterHandler(constants_1.VALID_KEY, ({ parameterIndex, originParamType, originArgs, metadata }) => {
35
- if (!metadata.schema) {
36
- metadata.schema = this.validateService.getSchema(originParamType);
37
- }
38
- return originArgs[parameterIndex];
39
- });
40
34
  // register web param default pipe
41
35
  this.decoratorService.registerParameterPipes(core_1.WEB_ROUTER_PARAM_KEY, [
42
36
  pipe_1.ValidationPipe,
@@ -1,5 +1,5 @@
1
1
  {
2
- "alternatives.all": "{{#label}} 不能匹配上所以可选项",
2
+ "alternatives.all": "{{#label}} 不能匹配上所有可选项",
3
3
  "alternatives.any": "{{#label}} 不能匹配上任何可选项",
4
4
  "alternatives.match": "{{#label}} 不能匹配上任何可选项",
5
5
  "alternatives.one": "{{#label}} 匹配超过一个可选项",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/validate",
3
- "version": "4.0.0-alpha.1",
3
+ "version": "4.0.0-beta.1",
4
4
  "description": "Midway Component for mongoose",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -23,14 +23,14 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@midwayjs/i18n": "^4.0.0-alpha.1",
26
+ "@midwayjs/i18n": "^4.0.0-beta.1",
27
27
  "joi": "17.13.3"
28
28
  },
29
29
  "devDependencies": {
30
- "@midwayjs/core": "^4.0.0-alpha.1",
31
- "@midwayjs/express": "^4.0.0-alpha.1",
32
- "@midwayjs/koa": "^4.0.0-alpha.1",
33
- "@midwayjs/mock": "^4.0.0-alpha.1"
30
+ "@midwayjs/core": "^4.0.0-beta.1",
31
+ "@midwayjs/express": "^4.0.0-beta.1",
32
+ "@midwayjs/koa": "^4.0.0-beta.1",
33
+ "@midwayjs/mock": "^4.0.0-beta.1"
34
34
  },
35
- "gitHead": "14bb4da91805a1cf52f190c0d37a74b395dd6372"
35
+ "gitHead": "832961ec3aff123c033197d8c00cb2bc9bad7ff8"
36
36
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2013 - Now midwayjs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.