@anncic-api/validator 3.4.5 → 3.4.7
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/dist/config/config.default.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Rule.js +1 -1
- package/dist/decorator/Validator.js +1 -1
- package/dist/exception/ValidatorError.js +1 -1
- package/dist/helper/dtoHelper.js +1 -1
- package/dist/helper/getSchema.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interface.js +1 -1
- package/dist/service/ValidatorService.js +1 -1
- package/index.d.ts +9 -9
- package/locales/en_US.json +116 -116
- package/locales/zh_CN.json +116 -116
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x38a19a=a0_0xb03f;(function(_0x2ceb68,_0x5798ee){const _0x2aca48=a0_0xb03f,_0x250bec=_0x2ceb68();while(!![]){try{const _0x396dbf=-parseInt(_0x2aca48(0x16a))/0x1+-parseInt(_0x2aca48(0x168))/0x2*(parseInt(_0x2aca48(0x16f))/0x3)+parseInt(_0x2aca48(0x175))/0x4+-parseInt(_0x2aca48(0x167))/0x5+-parseInt(_0x2aca48(0x173))/0x6+-parseInt(_0x2aca48(0x16e))/0x7+-parseInt(_0x2aca48(0x163))/0x8*(-parseInt(_0x2aca48(0x172))/0x9);if(_0x396dbf===_0x5798ee)break;else _0x250bec['push'](_0x250bec['shift']());}catch(_0x42f766){_0x250bec['push'](_0x250bec['shift']());}}}(a0_0x310a,0x34e2c));const a0_0x4f4e3e=(function(){let _0x4b5e6e=!![];return function(_0x2e3cdc,_0x48dad7){const _0x3deb53=_0x4b5e6e?function(){const _0x226d37=a0_0xb03f;if(_0x48dad7){const _0x1aa305=_0x48dad7[_0x226d37(0x171)](_0x2e3cdc,arguments);return _0x48dad7=null,_0x1aa305;}}:function(){};return _0x4b5e6e=![],_0x3deb53;};}()),a0_0x4340f2=a0_0x4f4e3e(this,function(){const _0x485f51=a0_0xb03f;return a0_0x4340f2[_0x485f51(0x16b)]()['search'](_0x485f51(0x169))['toString']()[_0x485f51(0x16d)](a0_0x4340f2)[_0x485f51(0x16c)](_0x485f51(0x169));});function a0_0x310a(){const _0x403a60=['2469523ptdhGN','1143003UlbHVx','../exception/ValidatorError','apply','45HdcevA','1171404zSvzdc','default','572468cRxRuj','defineProperty','1972184wnGhhL','PARAMS','../../locales/zh_CN.json','__esModule','499520mXmVqO','2FSSKQX','(((.+)+)+)+$','130184ghZEqg','toString','search','constructor'];a0_0x310a=function(){return _0x403a60;};return a0_0x310a();}a0_0x4340f2();'use strict';function a0_0xb03f(_0x32a3aa,_0x5715a7){const _0x21a21a=a0_0x310a();return a0_0xb03f=function(_0x4340f2,_0x4f4e3e){_0x4340f2=_0x4340f2-0x162;let _0x310ab1=_0x21a21a[_0x4340f2];return _0x310ab1;},a0_0xb03f(_0x32a3aa,_0x5715a7);}Object[a0_0x38a19a(0x162)](exports,a0_0x38a19a(0x166),{'value':!![]});const ValidatorError_1=require(a0_0x38a19a(0x170));exports[a0_0x38a19a(0x174)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x38a19a(0x164)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x38a19a(0x165))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x3571b5=a1_0x2642;function a1_0x2642(_0x1558c3,_0x39f778){const _0x21c99e=a1_0x3a79();return a1_0x2642=function(_0x5a083c,_0xbc106e){_0x5a083c=_0x5a083c-0xfd;let _0x3a7998=_0x21c99e[_0x5a083c];return _0x3a7998;},a1_0x2642(_0x1558c3,_0x39f778);}(function(_0x40a10a,_0x5adeae){const _0x4dc3df=a1_0x2642,_0x4fd9bd=_0x40a10a();while(!![]){try{const _0x4d2935=-parseInt(_0x4dc3df(0x134))/0x1+parseInt(_0x4dc3df(0x113))/0x2+parseInt(_0x4dc3df(0x11f))/0x3+parseInt(_0x4dc3df(0x135))/0x4*(-parseInt(_0x4dc3df(0x104))/0x5)+parseInt(_0x4dc3df(0x12a))/0x6+-parseInt(_0x4dc3df(0x11c))/0x7*(-parseInt(_0x4dc3df(0x12f))/0x8)+parseInt(_0x4dc3df(0xfe))/0x9*(-parseInt(_0x4dc3df(0x106))/0xa);if(_0x4d2935===_0x5adeae)break;else _0x4fd9bd['push'](_0x4fd9bd['shift']());}catch(_0x232c4f){_0x4fd9bd['push'](_0x4fd9bd['shift']());}}}(a1_0x3a79,0xbec6f));const a1_0xbc106e=(function(){let _0x1a16f1=!![];return function(_0x2beca3,_0xe72638){const _0x45c43a=_0x1a16f1?function(){const _0x492700=a1_0x2642;if(_0xe72638){const _0x51c606=_0xe72638[_0x492700(0x11d)](_0x2beca3,arguments);return _0xe72638=null,_0x51c606;}}:function(){};return _0x1a16f1=![],_0x45c43a;};}()),a1_0x5a083c=a1_0xbc106e(this,function(){const _0x2ff2fa=a1_0x2642;return a1_0x5a083c['toString']()['search'](_0x2ff2fa(0x103))[_0x2ff2fa(0x112)]()[_0x2ff2fa(0x115)](a1_0x5a083c)[_0x2ff2fa(0x117)](_0x2ff2fa(0x103));});a1_0x5a083c();'use strict';var __decorate=this&&this[a1_0x3571b5(0x121)]||function(_0x34c5ba,_0x2bc6ba,_0x1732c4,_0x17802f){const _0x1d04b6=a1_0x3571b5;var _0x2527cc=arguments[_0x1d04b6(0x10e)],_0x37cf73=_0x2527cc<0x3?_0x2bc6ba:_0x17802f===null?_0x17802f=Object[_0x1d04b6(0x127)](_0x2bc6ba,_0x1732c4):_0x17802f,_0x318a11;if(typeof Reflect===_0x1d04b6(0xfd)&&typeof Reflect['decorate']===_0x1d04b6(0x118))_0x37cf73=Reflect['decorate'](_0x34c5ba,_0x2bc6ba,_0x1732c4,_0x17802f);else{for(var _0x556d41=_0x34c5ba['length']-0x1;_0x556d41>=0x0;_0x556d41--)if(_0x318a11=_0x34c5ba[_0x556d41])_0x37cf73=(_0x2527cc<0x3?_0x318a11(_0x37cf73):_0x2527cc>0x3?_0x318a11(_0x2bc6ba,_0x1732c4,_0x37cf73):_0x318a11(_0x2bc6ba,_0x1732c4))||_0x37cf73;}return _0x2527cc>0x3&&_0x37cf73&&Object[_0x1d04b6(0x12c)](_0x2bc6ba,_0x1732c4,_0x37cf73),_0x37cf73;},__metadata=this&&this[a1_0x3571b5(0xff)]||function(_0xcad081,_0x2592cb){const _0x5ad997=a1_0x3571b5;if(typeof Reflect===_0x5ad997(0xfd)&&typeof Reflect[_0x5ad997(0x128)]===_0x5ad997(0x118))return Reflect[_0x5ad997(0x128)](_0xcad081,_0x2592cb);};Object[a1_0x3571b5(0x12c)](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;const i18n_1=require('@midwayjs/i18n'),core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),interface_1=require('./interface'),ValidatorService_1=require(a1_0x3571b5(0x105)),i18n=require(a1_0x3571b5(0x114)),anncic=require(a1_0x3571b5(0x126)),ConfigDefault=require('./config/config.default');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x1692cf=a1_0x3571b5;this[_0x1692cf(0x10c)][_0x1692cf(0x123)](interface_1['VALIDATOR_KEY'],_0x489dae=>{const _0x316d25=_0x1692cf,_0x10f784=_0x489dae[_0x316d25(0x128)],_0x314a17=(0x0,core_2[_0x316d25(0x125)])(_0x489dae[_0x316d25(0x109)],_0x489dae[_0x316d25(0x111)]);return{'before':_0x5cdcb6=>{const _0x60d21f=_0x316d25;var _0x40c6a,_0x262307,_0x1a85e1,_0xae8713,_0x3d1c22,_0x573a17,_0x403115,_0x847878,_0x22107b,_0x3e456d,_0x41e4b7,_0x253f9a,_0x11055d;const _0x2f634d=_0x5cdcb6[_0x60d21f(0x109)][core_1[_0x60d21f(0x122)]],_0x358d80=Object[_0x60d21f(0x136)]({},((_0x40c6a=_0x2f634d===null||_0x2f634d===void 0x0?void 0x0:_0x2f634d['request'])===null||_0x40c6a===void 0x0?void 0x0:_0x40c6a[_0x60d21f(0x10b)])||{},((_0x262307=_0x2f634d===null||_0x2f634d===void 0x0?void 0x0:_0x2f634d[_0x60d21f(0x10a)])===null||_0x262307===void 0x0?void 0x0:_0x262307['body'])||{}),_0x373ee4=((0x0,core_2[_0x60d21f(0x10f)])(interface_1['VALIDATOR_KEY'],_0x5cdcb6[_0x60d21f(0x109)])||[])[_0x60d21f(0x12b)](_0x11cd65=>_0x11cd65['method']==_0x5cdcb6[_0x60d21f(0x107)]);!(_0x10f784===null||_0x10f784===void 0x0?void 0x0:_0x10f784[_0x60d21f(0x133)])&&_0x2f634d&&_0x2f634d['getAttr']&&(_0x10f784[_0x60d21f(0x133)]=_0x2f634d['getAttr'](i18n_1[_0x60d21f(0x108)]));for(let _0x146297=0x0;_0x146297<_0x314a17[_0x60d21f(0x10e)];_0x146297++){const _0x535a29=_0x314a17[_0x146297],_0x28147f=this[_0x60d21f(0x102)][_0x60d21f(0x120)](_0x535a29);if(_0x28147f){if(typeof _0x5cdcb6['args'][_0x146297]=='undefined'||((_0x1a85e1=_0x5cdcb6[_0x60d21f(0x124)][_0x146297])===null||_0x1a85e1===void 0x0?void 0x0:_0x1a85e1[_0x60d21f(0x10a)])&&((_0xae8713=_0x5cdcb6[_0x60d21f(0x124)][_0x146297])===null||_0xae8713===void 0x0?void 0x0:_0xae8713[_0x60d21f(0x11e)])&&((_0x3d1c22=_0x5cdcb6[_0x60d21f(0x124)][_0x146297])===null||_0x3d1c22===void 0x0?void 0x0:_0x3d1c22['req']))_0x5cdcb6[_0x60d21f(0x124)][_0x146297]=_0x358d80;else((_0x573a17=_0x5cdcb6['args'][_0x146297])===null||_0x573a17===void 0x0?void 0x0:_0x573a17[_0x60d21f(0x100)])==_0x60d21f(0x12e)&&_0x5cdcb6[_0x60d21f(0x124)][_0x60d21f(0x132)](_0x146297,0x0,_0x358d80);const _0x2659fb=this[_0x60d21f(0x102)][_0x60d21f(0x11b)](_0x28147f,_0x5cdcb6[_0x60d21f(0x124)][_0x146297],_0x10f784);_0x2659fb&&(_0x5cdcb6['args'][_0x146297]=_0x2659fb);}else{if((_0x373ee4===null||_0x373ee4===void 0x0?void 0x0:_0x373ee4['methodArgs'][_0x146297])&&((_0x403115=_0x5cdcb6['args'][_0x146297])===null||_0x403115===void 0x0?void 0x0:_0x403115[_0x60d21f(0x129)])&&typeof _0x5cdcb6[_0x60d21f(0x124)][_0x146297][_0x60d21f(0x12d)]==_0x60d21f(0x118)&&((_0x847878=_0x2f634d===null||_0x2f634d===void 0x0?void 0x0:_0x2f634d[_0x60d21f(0x129)])===null||_0x847878===void 0x0?void 0x0:_0x847878[_0x373ee4['methodArgs'][_0x146297]]))_0x5cdcb6[_0x60d21f(0x124)][_0x146297]=_0x535a29((_0x22107b=_0x2f634d===null||_0x2f634d===void 0x0?void 0x0:_0x2f634d['params'])===null||_0x22107b===void 0x0?void 0x0:_0x22107b[_0x373ee4[_0x60d21f(0x11a)][_0x146297]]);else(_0x373ee4===null||_0x373ee4===void 0x0?void 0x0:_0x373ee4[_0x60d21f(0x11a)][_0x146297])&&((_0x41e4b7=(_0x3e456d=_0x5cdcb6[_0x60d21f(0x124)][_0x146297])===null||_0x3e456d===void 0x0?void 0x0:_0x3e456d[_0x60d21f(0x129)])===null||_0x41e4b7===void 0x0?void 0x0:_0x41e4b7[_0x373ee4[_0x60d21f(0x11a)][_0x146297]])&&(_0x5cdcb6[_0x60d21f(0x124)][_0x146297]=(_0x11055d=(_0x253f9a=_0x5cdcb6[_0x60d21f(0x124)][_0x146297])===null||_0x253f9a===void 0x0?void 0x0:_0x253f9a[_0x60d21f(0x129)])===null||_0x11055d===void 0x0?void 0x0:_0x11055d[_0x373ee4[_0x60d21f(0x11a)][_0x146297]]);}}},'afterThrow':(_0x3d668a,_0x8699f2)=>{throw _0x8699f2;}};});}};exports[a1_0x3571b5(0x131)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x3571b5(0x116)])(),__metadata(a1_0x3571b5(0x101),core_1[a1_0x3571b5(0x110)])],CustomConfiguration['prototype'],'decorator',void 0x0),__decorate([(0x0,core_2[a1_0x3571b5(0x116)])(),__metadata('design:type',ValidatorService_1[a1_0x3571b5(0x102)])],CustomConfiguration[a1_0x3571b5(0x130)],'ValidatorService',void 0x0),exports[a1_0x3571b5(0x131)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x3571b5(0x10d)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x3571b5(0x119),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);function a1_0x3a79(){const _0x1c9712=['__metadata','name','design:type','ValidatorService','(((.+)+)+)+$','3195WAQUVF','./service/ValidatorService','10TOCIXv','methodName','I18N_ATTR_KEY','target','request','query','decorator','Configuration','length','getClassMetadata','MidwayDecoratorService','propertyName','toString','2280288OhwhuF','@midwayjs/i18n','constructor','Inject','search','function','anncic-api:validator','methodArgs','validator','168vleRfD','apply','res','597438haBnbc','getSchema','__decorate','REQUEST_OBJ_CTX_KEY','registerMethodHandler','args','getMethodParamTypes','@anncic-api/core','getOwnPropertyDescriptor','metadata','params','7617348mXlsRK','find','defineProperty','param','bound\x20dispatch','172616igNPYE','prototype','CustomConfiguration','splice','locale','511323fHqntT','6432zprJWk','assign','object','7257942GuwRZV'];a1_0x3a79=function(){return _0x1c9712;};return a1_0x3a79();}
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a2_0x154187=a2_0x52e4;(function(_0x1d7f2c,_0x2ba229){const _0x25e707=a2_0x52e4,_0x3bfde5=_0x1d7f2c();while(!![]){try{const _0x2eed73=-parseInt(_0x25e707(0xb6))/0x1*(-parseInt(_0x25e707(0xae))/0x2)+parseInt(_0x25e707(0xb5))/0x3*(parseInt(_0x25e707(0xc6))/0x4)+-parseInt(_0x25e707(0xd1))/0x5+-parseInt(_0x25e707(0xb2))/0x6*(-parseInt(_0x25e707(0xbf))/0x7)+-parseInt(_0x25e707(0xbc))/0x8*(-parseInt(_0x25e707(0xc4))/0x9)+parseInt(_0x25e707(0xaf))/0xa+-parseInt(_0x25e707(0xb1))/0xb*(parseInt(_0x25e707(0xcd))/0xc);if(_0x2eed73===_0x2ba229)break;else _0x3bfde5['push'](_0x3bfde5['shift']());}catch(_0x94efa9){_0x3bfde5['push'](_0x3bfde5['shift']());}}}(a2_0x5342,0x571a9));const a2_0x23a052=(function(){let _0x2718a4=!![];return function(_0x3b9982,_0x62f099){const _0x3a0158=_0x2718a4?function(){if(_0x62f099){const _0x41346c=_0x62f099['apply'](_0x3b9982,arguments);return _0x62f099=null,_0x41346c;}}:function(){};return _0x2718a4=![],_0x3a0158;};}()),a2_0xb93113=a2_0x23a052(this,function(){const _0x2bfab0=a2_0x52e4;return a2_0xb93113[_0x2bfab0(0xc5)]()[_0x2bfab0(0xcc)]('(((.+)+)+)+$')[_0x2bfab0(0xc5)]()[_0x2bfab0(0xce)](a2_0xb93113)[_0x2bfab0(0xcc)](_0x2bfab0(0xbd));});function a2_0x5342(){const _0x3735e8=['getPropertyType','4819707biHQSc','toString','2578548HIrMKn','label','array','RULES_KEY','RuleType','Rule','search','144kqPjTg','constructor','extend','../interface','611880qtSPjS','@midwayjs/core','joi','name','function','@joi/date','592316PohiHP','3988700XMbBVh','meta','1966789SCpQmP','6ocyspp','defineProperty','isSchema','3Iyenci','2uFGUwu','attachClassMetadata','items','default','saveClassMetadata','map','8EDjAKS','(((.+)+)+)+$','object','3173765hCPxwf','description','getClassMetadata','Array'];a2_0x5342=function(){return _0x3735e8;};return a2_0x5342();}a2_0xb93113();'use strict';Object[a2_0x154187(0xb3)](exports,'__esModule',{'value':!![]}),exports['Rule']=exports[a2_0x154187(0xca)]=void 0x0;function a2_0x52e4(_0x4840ba,_0x3a5bf5){const _0x29725b=a2_0x5342();return a2_0x52e4=function(_0xb93113,_0x23a052){_0xb93113=_0xb93113-0xad;let _0x5342b8=_0x29725b[_0xb93113];return _0x5342b8;},a2_0x52e4(_0x4840ba,_0x3a5bf5);}const joi=require(a2_0x154187(0xd3)),date_1=require(a2_0x154187(0xad)),core_1=require(a2_0x154187(0xd2)),interface_1=require(a2_0x154187(0xd0));exports[a2_0x154187(0xca)]=joi[a2_0x154187(0xcf)](date_1[a2_0x154187(0xb9)]);function Rule(_0x56c671,_0x4a76bd,_0x5c4ccf=''){return(_0x1a629f,_0x4557f9)=>{const _0xea041e=a2_0x52e4;var _0x40cee3;if(_0x4557f9)!joi[_0xea041e(0xb4)](_0x4a76bd)&&(_0x4a76bd===null||_0x4a76bd===void 0x0?void 0x0:_0x4a76bd[_0xea041e(0xd4)])&&(_0x4a76bd=joi[_0xea041e(0xbe)]((0x0,core_1[_0xea041e(0xc1)])(interface_1[_0xea041e(0xc9)],_0x4a76bd))[_0xea041e(0xb0)]({'id':_0x4a76bd['name']}),(0x0,core_1[_0xea041e(0xc3)])(_0x1a629f,_0x4557f9)[_0xea041e(0xd4)]===_0xea041e(0xc2)&&(_0x4a76bd=joi[_0xea041e(0xc8)]()[_0xea041e(0xb8)](_0x4a76bd))),joi[_0xea041e(0xb4)](_0x4a76bd)&&(_0x56c671&&typeof(_0x4a76bd===null||_0x4a76bd===void 0x0?void 0x0:_0x4a76bd['label'])=='function'&&(_0x4a76bd=_0x4a76bd[_0xea041e(0xc7)](_0x56c671)),_0x5c4ccf&&typeof(_0x4a76bd===null||_0x4a76bd===void 0x0?void 0x0:_0x4a76bd['description'])==_0xea041e(0xd5)&&(_0x4a76bd=_0x4a76bd[_0xea041e(0xc0)](_0x5c4ccf)),(0x0,core_1[_0xea041e(0xb7)])(interface_1[_0xea041e(0xc9)],_0x4a76bd,_0x1a629f,_0x4557f9));else{const _0x24f62e=(0x0,core_1[_0xea041e(0xc1)])(interface_1[_0xea041e(0xc9)],_0x4a76bd);if(_0x24f62e){let _0x20166e=(_0x40cee3=(0x0,core_1['getClassMetadata'])(interface_1[_0xea041e(0xc9)],_0x1a629f))!==null&&_0x40cee3!==void 0x0?_0x40cee3:{};Object['keys'](_0x24f62e)[_0xea041e(0xbb)](_0x3a18e9=>{!_0x20166e[_0x3a18e9]&&(_0x20166e[_0x3a18e9]=_0x24f62e[_0x3a18e9]);}),(0x0,core_1[_0xea041e(0xba)])(interface_1[_0xea041e(0xc9)],_0x20166e,_0x1a629f);}}};}exports[a2_0x154187(0xcb)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5292a3=a3_0xb320;(function(_0x38d4c,_0xa3f923){const _0x579329=a3_0xb320,_0x493afc=_0x38d4c();while(!![]){try{const _0x33b2ab=-parseInt(_0x579329(0x179))/0x1+-parseInt(_0x579329(0x18c))/0x2+-parseInt(_0x579329(0x186))/0x3*(-parseInt(_0x579329(0x185))/0x4)+parseInt(_0x579329(0x182))/0x5+parseInt(_0x579329(0x184))/0x6+parseInt(_0x579329(0x191))/0x7*(-parseInt(_0x579329(0x17c))/0x8)+parseInt(_0x579329(0x17f))/0x9*(parseInt(_0x579329(0x18b))/0xa);if(_0x33b2ab===_0xa3f923)break;else _0x493afc['push'](_0x493afc['shift']());}catch(_0x19403d){_0x493afc['push'](_0x493afc['shift']());}}}(a3_0x545a,0x8c10d));const a3_0x43fdd2=(function(){let _0x558f9a=!![];return function(_0x2eae14,_0x2d8c96){const _0x32fff3=_0x558f9a?function(){const _0x349b5f=a3_0xb320;if(_0x2d8c96){const _0x520a40=_0x2d8c96[_0x349b5f(0x188)](_0x2eae14,arguments);return _0x2d8c96=null,_0x520a40;}}:function(){};return _0x558f9a=![],_0x32fff3;};}()),a3_0x54eb4a=a3_0x43fdd2(this,function(){const _0x858332=a3_0xb320;return a3_0x54eb4a[_0x858332(0x181)]()['search'](_0x858332(0x194))[_0x858332(0x181)]()[_0x858332(0x18f)](a3_0x54eb4a)[_0x858332(0x180)](_0x858332(0x194));});a3_0x54eb4a();'use strict';Object[a3_0x5292a3(0x18a)](exports,a3_0x5292a3(0x18d),{'value':!![]}),exports[a3_0x5292a3(0x192)]=exports['Validator']=void 0x0;function a3_0x545a(){const _0x118ba8=['toString','3770680KmXvzW','createCustomMethodDecorator','2927322QSIiUT','12140FOkedS','669XZzzlg','prototype','apply','VALIDATOR_KEY','defineProperty','157890YKEleW','1936730LCJCSB','__esModule','indexOf','constructor','../interface','7RfYpGD','getFuncArgs','attachClassMetadata','(((.+)+)+)+$','190590enFwcW','replace','function','4773424YRZGsh','match','Validator','234mVTJgT','search'];a3_0x545a=function(){return _0x118ba8;};return a3_0x545a();}const core_1=require('@midwayjs/core'),interface_1=require(a3_0x5292a3(0x190));function a3_0xb320(_0x3be252,_0x180bb7){const _0xef8f00=a3_0x545a();return a3_0xb320=function(_0x54eb4a,_0x43fdd2){_0x54eb4a=_0x54eb4a-0x179;let _0x545abb=_0xef8f00[_0x54eb4a];return _0x545abb;},a3_0xb320(_0x3be252,_0x180bb7);}function Validator(_0x26d055={}){return(_0x9db08d,_0x5a88a5,_0x350e91)=>{const _0x28fa91=a3_0xb320,_0xcfec13=getFuncArgs(_0x9db08d[_0x5a88a5]);(0x0,core_1[_0x28fa91(0x193)])(interface_1[_0x28fa91(0x189)],{'method':_0x5a88a5,'methodArgs':_0xcfec13},_0x9db08d),(0x0,core_1[_0x28fa91(0x183)])(interface_1[_0x28fa91(0x189)],_0x26d055)(_0x9db08d,_0x5a88a5,_0x350e91);};}exports[a3_0x5292a3(0x17e)]=Validator;function getFuncArgs(_0x55de9b){const _0x11093a=a3_0x5292a3;if(typeof _0x55de9b==_0x11093a(0x17b)){const _0x839013=/=>.*$/mg,_0x290d82=/=[^,)]+/mg,_0x19962d=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x17488a=(_0x55de9b[_0x11093a(0x187)]?_0x55de9b[_0x11093a(0x187)][_0x11093a(0x18f)][_0x11093a(0x181)]():_0x55de9b['toString']())[_0x11093a(0x17a)](_0x19962d,'')[_0x11093a(0x17a)](_0x839013,'')['replace'](_0x290d82,''),_0x38ef60=_0x17488a['slice'](_0x17488a[_0x11093a(0x18e)]('(')+0x1,_0x17488a[_0x11093a(0x18e)](')'))[_0x11093a(0x17d)](/([^\s,]+)/g)||[];return _0x38ef60;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a4_0x17f1b4=a4_0x5049;(function(_0x4a967c,_0x2775b2){var _0x1ebe44=a4_0x5049,_0xcbfa57=_0x4a967c();while(!![]){try{var _0x29422c=-parseInt(_0x1ebe44(0x10a))/0x1+-parseInt(_0x1ebe44(0x108))/0x2+-parseInt(_0x1ebe44(0x117))/0x3*(parseInt(_0x1ebe44(0x105))/0x4)+-parseInt(_0x1ebe44(0x10f))/0x5*(parseInt(_0x1ebe44(0x107))/0x6)+parseInt(_0x1ebe44(0x102))/0x7+parseInt(_0x1ebe44(0x109))/0x8*(parseInt(_0x1ebe44(0x119))/0x9)+parseInt(_0x1ebe44(0x10c))/0xa*(parseInt(_0x1ebe44(0x11a))/0xb);if(_0x29422c===_0x2775b2)break;else _0xcbfa57['push'](_0xcbfa57['shift']());}catch(_0x36f07b){_0xcbfa57['push'](_0xcbfa57['shift']());}}}(a4_0x7046,0xa6ce8));var a4_0x54b181=(function(){var _0x2fdaac=!![];return function(_0x55fe67,_0x26f7b8){var _0x41e7fe=_0x2fdaac?function(){var _0x448503=a4_0x5049;if(_0x26f7b8){var _0x4b2a7a=_0x26f7b8[_0x448503(0x100)](_0x55fe67,arguments);return _0x26f7b8=null,_0x4b2a7a;}}:function(){};return _0x2fdaac=![],_0x41e7fe;};}()),a4_0x341232=a4_0x54b181(this,function(){var _0x94bd10=a4_0x5049;return a4_0x341232[_0x94bd10(0x113)]()[_0x94bd10(0x11b)]('(((.+)+)+)+$')[_0x94bd10(0x113)]()[_0x94bd10(0x110)](a4_0x341232)[_0x94bd10(0x11b)](_0x94bd10(0x10b));});function a4_0x7046(){var _0x80bd8d=['NOFIND_SCHEMA','7244405mDGhda','function','metadata','4AMDaIj','object','2385876yIoBWX','1572116dtGmsY','56QJeuAK','1225518IgKENC','(((.+)+)+)+$','152220LftFjh','design:type','length','15PtJChI','constructor','__metadata','ValidatorError','toString','decorate','__esModule','AnnErrorMsg','516756TTBPyK','参数验证失败','229599SYiUHr','2057vXZPus','search','defineProperty','apply'];a4_0x7046=function(){return _0x80bd8d;};return a4_0x7046();}a4_0x341232();function a4_0x5049(_0x1e7f0a,_0x25da83){var _0x4b6998=a4_0x7046();return a4_0x5049=function(_0x341232,_0x54b181){_0x341232=_0x341232-0xff;var _0x70468a=_0x4b6998[_0x341232];return _0x70468a;},a4_0x5049(_0x1e7f0a,_0x25da83);}'use strict';var __decorate=this&&this['__decorate']||function(_0x403f27,_0x29dfb6,_0x40dc64,_0x322e3f){var _0x3f215a=a4_0x5049,_0x53c113=arguments[_0x3f215a(0x10e)],_0x348914=_0x53c113<0x3?_0x29dfb6:_0x322e3f===null?_0x322e3f=Object['getOwnPropertyDescriptor'](_0x29dfb6,_0x40dc64):_0x322e3f,_0x14e75d;if(typeof Reflect===_0x3f215a(0x106)&&typeof Reflect[_0x3f215a(0x114)]==='function')_0x348914=Reflect[_0x3f215a(0x114)](_0x403f27,_0x29dfb6,_0x40dc64,_0x322e3f);else{for(var _0x1861f3=_0x403f27[_0x3f215a(0x10e)]-0x1;_0x1861f3>=0x0;_0x1861f3--)if(_0x14e75d=_0x403f27[_0x1861f3])_0x348914=(_0x53c113<0x3?_0x14e75d(_0x348914):_0x53c113>0x3?_0x14e75d(_0x29dfb6,_0x40dc64,_0x348914):_0x14e75d(_0x29dfb6,_0x40dc64))||_0x348914;}return _0x53c113>0x3&&_0x348914&&Object[_0x3f215a(0xff)](_0x29dfb6,_0x40dc64,_0x348914),_0x348914;},__metadata=this&&this[a4_0x17f1b4(0x111)]||function(_0x42f8c8,_0x2e309b){var _0x4d111a=a4_0x17f1b4;if(typeof Reflect===_0x4d111a(0x106)&&typeof Reflect[_0x4d111a(0x104)]===_0x4d111a(0x103))return Reflect['metadata'](_0x42f8c8,_0x2e309b);};Object[a4_0x17f1b4(0xff)](exports,a4_0x17f1b4(0x115),{'value':!![]}),exports['ValidatorError']=void 0x0;const core_1=require('@anncic-api/core');class ValidatorError extends AnnError{}exports[a4_0x17f1b4(0x112)]=ValidatorError,ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x17f1b4(0x101)]=0x18c1c,__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x17f1b4(0x118)),__metadata(a4_0x17f1b4(0x10d),Object)],ValidatorError,'PARAMS',void 0x0),__decorate([(0x0,core_1[a4_0x17f1b4(0x116)])(a4_0x17f1b4(0x118)),__metadata(a4_0x17f1b4(0x10d),Object)],ValidatorError,a4_0x17f1b4(0x101),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x409bc7=a5_0x1f0a;function a5_0x1903(){const _0x455674=['130428indUnT','7mPUKhQ','toString','prototype','defineProperty','178621FoLBJo','(((.+)+)+)+$','__esModule','1240928UoBTmK','2319810kyJGjx','assign','445644lyjEcC','constructor','36xyzRuJ','../interface','1124412VHBEHg','apply','55gcHtLO','saveClassMetadata','search','OmitDto','PickDto','RULES_KEY','@midwayjs/core','getClassExtendedMetadata','2111070qYomJw'];a5_0x1903=function(){return _0x455674;};return a5_0x1903();}function a5_0x1f0a(_0x3de9a1,_0x392bd9){const _0xbcfaed=a5_0x1903();return a5_0x1f0a=function(_0x3681c1,_0x57b106){_0x3681c1=_0x3681c1-0x156;let _0x1903a8=_0xbcfaed[_0x3681c1];return _0x1903a8;},a5_0x1f0a(_0x3de9a1,_0x392bd9);}(function(_0x276ee5,_0x3e84e3){const _0x4c628c=a5_0x1f0a,_0x16fd65=_0x276ee5();while(!![]){try{const _0x4dd53e=-parseInt(_0x4c628c(0x15e))/0x1+-parseInt(_0x4c628c(0x164))/0x2+-parseInt(_0x4c628c(0x168))/0x3+-parseInt(_0x4c628c(0x159))/0x4*(-parseInt(_0x4c628c(0x16a))/0x5)+-parseInt(_0x4c628c(0x162))/0x6+parseInt(_0x4c628c(0x15a))/0x7*(parseInt(_0x4c628c(0x161))/0x8)+-parseInt(_0x4c628c(0x166))/0x9*(-parseInt(_0x4c628c(0x158))/0xa);if(_0x4dd53e===_0x3e84e3)break;else _0x16fd65['push'](_0x16fd65['shift']());}catch(_0x27952b){_0x16fd65['push'](_0x16fd65['shift']());}}}(a5_0x1903,0x2fb0b));const a5_0x57b106=(function(){let _0x36bc69=!![];return function(_0x50d0ba,_0x277fc5){const _0x2090a4=_0x36bc69?function(){const _0x89c297=a5_0x1f0a;if(_0x277fc5){const _0x25a423=_0x277fc5[_0x89c297(0x169)](_0x50d0ba,arguments);return _0x277fc5=null,_0x25a423;}}:function(){};return _0x36bc69=![],_0x2090a4;};}()),a5_0x3681c1=a5_0x57b106(this,function(){const _0x558421=a5_0x1f0a;return a5_0x3681c1[_0x558421(0x15b)]()['search'](_0x558421(0x15f))[_0x558421(0x15b)]()[_0x558421(0x165)](a5_0x3681c1)[_0x558421(0x16c)](_0x558421(0x15f));});a5_0x3681c1();'use strict';Object[a5_0x409bc7(0x15d)](exports,a5_0x409bc7(0x160),{'value':!![]}),exports[a5_0x409bc7(0x16d)]=exports[a5_0x409bc7(0x16e)]=void 0x0;const core_1=require(a5_0x409bc7(0x156)),interface_1=require(a5_0x409bc7(0x167));function PickDto(_0x280bb5,_0x14a007){const _0x1289b7=a5_0x409bc7,_0x5c4bc5=function(){};_0x5c4bc5[_0x1289b7(0x15c)]=_0x280bb5[_0x1289b7(0x15c)];const _0x30036b=(0x0,core_1[_0x1289b7(0x157)])(interface_1[_0x1289b7(0x16f)],_0x280bb5),_0x2ec2d6={};for(const _0x19aa90 of _0x14a007){_0x30036b[_0x19aa90]&&(_0x2ec2d6[_0x19aa90]=_0x30036b[_0x19aa90]);}return(0x0,core_1[_0x1289b7(0x16b)])(interface_1[_0x1289b7(0x16f)],_0x2ec2d6,_0x5c4bc5),_0x5c4bc5;}exports[a5_0x409bc7(0x16e)]=PickDto;function OmitDto(_0x4434b9,_0x9076a8){const _0x3431a8=a5_0x409bc7,_0x1dd1f9=function(){};_0x1dd1f9[_0x3431a8(0x15c)]=_0x4434b9[_0x3431a8(0x15c)];const _0x571bd7=(0x0,core_1[_0x3431a8(0x157)])(interface_1['RULES_KEY'],_0x4434b9),_0x1c5cac=Object[_0x3431a8(0x163)]({},_0x571bd7);for(const _0x460d33 of _0x9076a8){delete _0x1c5cac[_0x460d33];}return(0x0,core_1[_0x3431a8(0x16b)])(interface_1[_0x3431a8(0x16f)],_0x1c5cac,_0x1dd1f9),_0x1dd1f9;}exports[a5_0x409bc7(0x16d)]=OmitDto;
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a6_0x2a01(){const _0x39bdeb=['@midwayjs/core','getSchema','RULES_KEY','(((.+)+)+)+$','7082576QJELqq','56hRbjiW','4426646dPPeHS','toString','__esModule','155049rSneXy','object','search','../interface','2fDYmwb','getClassExtendedMetadata','18766sipnhY','35682jaQmLL','defineProperty','apply','147916jTVLfY','112950uLWRCR','joi','1010xUapdu','constructor','250RLObnE'];a6_0x2a01=function(){return _0x39bdeb;};return a6_0x2a01();}const a6_0x485d39=a6_0x32ab;(function(_0x254085,_0x2339e7){const _0x41f3b4=a6_0x32ab,_0x2503ce=_0x254085();while(!![]){try{const _0x43bc9e=-parseInt(_0x41f3b4(0xca))/0x1*(parseInt(_0x41f3b4(0xb7))/0x2)+parseInt(_0x41f3b4(0xc6))/0x3*(-parseInt(_0x41f3b4(0xc2))/0x4)+parseInt(_0x41f3b4(0xbc))/0x5*(-parseInt(_0x41f3b4(0xb4))/0x6)+parseInt(_0x41f3b4(0xc3))/0x7+parseInt(_0x41f3b4(0xc1))/0x8+-parseInt(_0x41f3b4(0xb8))/0x9+-parseInt(_0x41f3b4(0xba))/0xa*(-parseInt(_0x41f3b4(0xb3))/0xb);if(_0x43bc9e===_0x2339e7)break;else _0x2503ce['push'](_0x2503ce['shift']());}catch(_0x21db71){_0x2503ce['push'](_0x2503ce['shift']());}}}(a6_0x2a01,0x7c2d4));const a6_0x2248fc=(function(){let _0x283b5d=!![];return function(_0x371a2f,_0x5e7386){const _0x5694bd=_0x283b5d?function(){const _0xb15777=a6_0x32ab;if(_0x5e7386){const _0xf6a06e=_0x5e7386[_0xb15777(0xb6)](_0x371a2f,arguments);return _0x5e7386=null,_0xf6a06e;}}:function(){};return _0x283b5d=![],_0x5694bd;};}()),a6_0x10aecc=a6_0x2248fc(this,function(){const _0x669587=a6_0x32ab;return a6_0x10aecc[_0x669587(0xc4)]()[_0x669587(0xc8)]('(((.+)+)+)+$')[_0x669587(0xc4)]()[_0x669587(0xbb)](a6_0x10aecc)[_0x669587(0xc8)](_0x669587(0xc0));});function a6_0x32ab(_0x4c7d9a,_0x406b39){const _0x337d2f=a6_0x2a01();return a6_0x32ab=function(_0x10aecc,_0x2248fc){_0x10aecc=_0x10aecc-0xb2;let _0x2a0107=_0x337d2f[_0x10aecc];return _0x2a0107;},a6_0x32ab(_0x4c7d9a,_0x406b39);}a6_0x10aecc();'use strict';Object[a6_0x485d39(0xb5)](exports,a6_0x485d39(0xc5),{'value':!![]}),exports[a6_0x485d39(0xbe)]=void 0x0;const Joi=require(a6_0x485d39(0xb9)),core_1=require(a6_0x485d39(0xbd)),interface_1=require(a6_0x485d39(0xc9));function getSchema(_0x3653a7){const _0x553553=a6_0x485d39,_0x2cd3a0=(0x0,core_1[_0x553553(0xb2)])(interface_1[_0x553553(0xbf)],_0x3653a7);if(_0x2cd3a0)return Joi[_0x553553(0xc7)](_0x2cd3a0);}exports['getSchema']=getSchema;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x55076e=a7_0x60af;(function(_0x514a4d,_0x378707){var _0x51164b=a7_0x60af,_0x20aefd=_0x514a4d();while(!![]){try{var _0x22fab7=parseInt(_0x51164b(0x1c4))/0x1+-parseInt(_0x51164b(0x1d4))/0x2*(parseInt(_0x51164b(0x1c1))/0x3)+-parseInt(_0x51164b(0x1d1))/0x4+parseInt(_0x51164b(0x1d0))/0x5+-parseInt(_0x51164b(0x1d7))/0x6+parseInt(_0x51164b(0x1db))/0x7*(parseInt(_0x51164b(0x1d3))/0x8)+-parseInt(_0x51164b(0x1cd))/0x9*(-parseInt(_0x51164b(0x1d9))/0xa);if(_0x22fab7===_0x378707)break;else _0x20aefd['push'](_0x20aefd['shift']());}catch(_0x131c3d){_0x20aefd['push'](_0x20aefd['shift']());}}}(a7_0x2f29,0xa6802));var a7_0x54be3f=(function(){var _0xf127b1=!![];return function(_0xe0e48c,_0x147e0e){var _0x4138e8=_0xf127b1?function(){if(_0x147e0e){var _0x17b673=_0x147e0e['apply'](_0xe0e48c,arguments);return _0x147e0e=null,_0x17b673;}}:function(){};return _0xf127b1=![],_0x4138e8;};}()),a7_0x118913=a7_0x54be3f(this,function(){var _0x2e4032=a7_0x60af;return a7_0x118913[_0x2e4032(0x1df)]()['search']('(((.+)+)+)+$')['toString']()['constructor'](a7_0x118913)[_0x2e4032(0x1c5)]('(((.+)+)+)+$');});a7_0x118913();'use strict';function a7_0x2f29(){var _0x55a608=['__esModule','3723785DXjFuK','3964564JYzfOf','ValidatorError','3095944AuutYd','2IBKAsI','prototype','./helper/getSchema','4542564NMEhVK','RuleType','80AtXJjT','Configuration','7tACGNW','CustomConfiguration','./configuration','Validator','toString','defineProperty','configurable','527577QvyNUo','__createBinding','ValidatorService','888722mPgMsb','search','create','writable','hasOwnProperty','Rule','./interface','./decorator/Validator','call','658809bxoLmY','default'];a7_0x2f29=function(){return _0x55a608;};return a7_0x2f29();}var __createBinding=this&&this[a7_0x55076e(0x1c2)]||(Object[a7_0x55076e(0x1c6)]?function(_0x393049,_0x505f5e,_0x3ac19d,_0x2e3fec){var _0x1c6564=a7_0x55076e;if(_0x2e3fec===undefined)_0x2e3fec=_0x3ac19d;var _0x2bfb68=Object['getOwnPropertyDescriptor'](_0x505f5e,_0x3ac19d);(!_0x2bfb68||('get'in _0x2bfb68?!_0x505f5e[_0x1c6564(0x1cf)]:_0x2bfb68[_0x1c6564(0x1c7)]||_0x2bfb68[_0x1c6564(0x1e1)]))&&(_0x2bfb68={'enumerable':!![],'get':function(){return _0x505f5e[_0x3ac19d];}}),Object[_0x1c6564(0x1e0)](_0x393049,_0x2e3fec,_0x2bfb68);}:function(_0x1dc759,_0xd54de6,_0x24a2e4,_0x121800){if(_0x121800===undefined)_0x121800=_0x24a2e4;_0x1dc759[_0x121800]=_0xd54de6[_0x24a2e4];}),__exportStar=this&&this['__exportStar']||function(_0x3ce057,_0x31f9d6){var _0xc74673=a7_0x55076e;for(var _0x2b9cb0 in _0x3ce057)if(_0x2b9cb0!==_0xc74673(0x1ce)&&!Object[_0xc74673(0x1d5)][_0xc74673(0x1c8)][_0xc74673(0x1cc)](_0x31f9d6,_0x2b9cb0))__createBinding(_0x31f9d6,_0x3ce057,_0x2b9cb0);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Configuration']=exports[a7_0x55076e(0x1c3)]=exports[a7_0x55076e(0x1d2)]=exports[a7_0x55076e(0x1d8)]=exports[a7_0x55076e(0x1c9)]=exports[a7_0x55076e(0x1de)]=void 0x0,__exportStar(require(a7_0x55076e(0x1ca)),exports),__exportStar(require('./helper/dtoHelper'),exports),__exportStar(require(a7_0x55076e(0x1d6)),exports);var Validator_1=require(a7_0x55076e(0x1cb));Object[a7_0x55076e(0x1e0)](exports,'Validator',{'enumerable':!![],'get':function(){var _0xd0254e=a7_0x55076e;return Validator_1[_0xd0254e(0x1de)];}});function a7_0x60af(_0xddc52c,_0xede742){var _0x403b1d=a7_0x2f29();return a7_0x60af=function(_0x118913,_0x54be3f){_0x118913=_0x118913-0x1c1;var _0x2f29b8=_0x403b1d[_0x118913];return _0x2f29b8;},a7_0x60af(_0xddc52c,_0xede742);}var Rule_1=require('./decorator/Rule');Object[a7_0x55076e(0x1e0)](exports,a7_0x55076e(0x1c9),{'enumerable':!![],'get':function(){var _0x1a064c=a7_0x55076e;return Rule_1[_0x1a064c(0x1c9)];}}),Object[a7_0x55076e(0x1e0)](exports,a7_0x55076e(0x1d8),{'enumerable':!![],'get':function(){var _0x331cef=a7_0x55076e;return Rule_1[_0x331cef(0x1d8)];}});var ValidatorError_1=require('./exception/ValidatorError');Object['defineProperty'](exports,a7_0x55076e(0x1d2),{'enumerable':!![],'get':function(){var _0x418111=a7_0x55076e;return ValidatorError_1[_0x418111(0x1d2)];}});var ValidatorService_1=require('./service/ValidatorService');Object[a7_0x55076e(0x1e0)](exports,a7_0x55076e(0x1c3),{'enumerable':!![],'get':function(){var _0x457777=a7_0x55076e;return ValidatorService_1[_0x457777(0x1c3)];}});var configuration_1=require(a7_0x55076e(0x1dd));Object['defineProperty'](exports,a7_0x55076e(0x1da),{'enumerable':!![],'get':function(){var _0x5b7185=a7_0x55076e;return configuration_1[_0x5b7185(0x1dc)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x1b85d0=a8_0x1029;function a8_0x4acd(){var _0x4cd47f=['apply','search','RULES_KEY','9423078RHIMnA','39522016FuGpAk','1302920AgnBkn','defineProperty','VALIDATOR_KEY','4093443TVMltl','anncic-api:validator:validator','409906ZQOXmn','toString','4zbUecp','2847432mnEpmo','4777750fQTvLf','__esModule','(((.+)+)+)+$'];a8_0x4acd=function(){return _0x4cd47f;};return a8_0x4acd();}(function(_0x4c8225,_0x56c2cb){var _0x44e344=a8_0x1029,_0x2ebece=_0x4c8225();while(!![]){try{var _0x279171=-parseInt(_0x44e344(0xf6))/0x1+-parseInt(_0x44e344(0xf1))/0x2+parseInt(_0x44e344(0xf4))/0x3*(-parseInt(_0x44e344(0xf8))/0x4)+-parseInt(_0x44e344(0xe9))/0x5+parseInt(_0x44e344(0xf9))/0x6+-parseInt(_0x44e344(0xef))/0x7+parseInt(_0x44e344(0xf0))/0x8;if(_0x279171===_0x56c2cb)break;else _0x2ebece['push'](_0x2ebece['shift']());}catch(_0x2e36ac){_0x2ebece['push'](_0x2ebece['shift']());}}}(a8_0x4acd,0xa7ca9));var a8_0x37985f=(function(){var _0x1b60cb=!![];return function(_0x1a8768,_0x417a4f){var _0x2396c6=_0x1b60cb?function(){var _0x4a64c2=a8_0x1029;if(_0x417a4f){var _0xa8c886=_0x417a4f[_0x4a64c2(0xec)](_0x1a8768,arguments);return _0x417a4f=null,_0xa8c886;}}:function(){};return _0x1b60cb=![],_0x2396c6;};}()),a8_0x363ebf=a8_0x37985f(this,function(){var _0x40f42b=a8_0x1029;return a8_0x363ebf[_0x40f42b(0xf7)]()[_0x40f42b(0xed)]('(((.+)+)+)+$')[_0x40f42b(0xf7)]()['constructor'](a8_0x363ebf)['search'](_0x40f42b(0xeb));});function a8_0x1029(_0x27bd4e,_0x36de76){var _0x55b22d=a8_0x4acd();return a8_0x1029=function(_0x363ebf,_0x37985f){_0x363ebf=_0x363ebf-0xe9;var _0x4acd7c=_0x55b22d[_0x363ebf];return _0x4acd7c;},a8_0x1029(_0x27bd4e,_0x36de76);}a8_0x363ebf();'use strict';Object[a8_0x1b85d0(0xf2)](exports,a8_0x1b85d0(0xea),{'value':!![]}),exports[a8_0x1b85d0(0xf3)]=exports[a8_0x1b85d0(0xee)]=void 0x0,exports[a8_0x1b85d0(0xee)]='anncic-api:validator:rules',exports['VALIDATOR_KEY']=a8_0x1b85d0(0xf5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0x5944fa=a9_0xaad9;(function(_0x4be034,_0x1a8612){const _0x5cd793=a9_0xaad9,_0x2df6be=_0x4be034();while(!![]){try{const _0x44d998=-parseInt(_0x5cd793(0x1c6))/0x1*(parseInt(_0x5cd793(0x1c5))/0x2)+-parseInt(_0x5cd793(0x1a6))/0x3+-parseInt(_0x5cd793(0x1b1))/0x4+parseInt(_0x5cd793(0x1b9))/0x5*(-parseInt(_0x5cd793(0x19e))/0x6)+-parseInt(_0x5cd793(0x1c9))/0x7*(-parseInt(_0x5cd793(0x1ba))/0x8)+-parseInt(_0x5cd793(0x1aa))/0x9+parseInt(_0x5cd793(0x1b7))/0xa;if(_0x44d998===_0x1a8612)break;else _0x2df6be['push'](_0x2df6be['shift']());}catch(_0x65329c){_0x2df6be['push'](_0x2df6be['shift']());}}}(a9_0x403d,0xa3eac));const a9_0x3a447e=(function(){let _0x3a4001=!![];return function(_0x262101,_0x311ee7){const _0x49a81a=_0x3a4001?function(){const _0x5af677=a9_0xaad9;if(_0x311ee7){const _0x26f968=_0x311ee7[_0x5af677(0x1cb)](_0x262101,arguments);return _0x311ee7=null,_0x26f968;}}:function(){};return _0x3a4001=![],_0x49a81a;};}()),a9_0xf210f9=a9_0x3a447e(this,function(){const _0x2c806b=a9_0xaad9;return a9_0xf210f9['toString']()['search'](_0x2c806b(0x19a))[_0x2c806b(0x1ae)]()[_0x2c806b(0x1b4)](a9_0xf210f9)[_0x2c806b(0x1cd)](_0x2c806b(0x19a));});function a9_0x403d(){const _0x4d492a=['MidwayI18nServiceSingleton','toString','design:returntype','ScopeEnum','1671056KIQuSo','$_terms','参数验证失败','constructor','metadata','prototype','25104640bXoPKr','keys','5ECcfor','296YDugvd','ValidatorError','__decorate','messages','message','../exception/ValidatorError','Inject','object','getOwnPropertyDescriptor','decorate','i18nConfig','2pxhAxU','379529huOAkc','i18n','format','148561koPfxd','__metadata','apply','fromEntries','search','@midwayjs/i18n','YYYY-MM-DD\x20HH:mm:ss','forEach','formatLocale','localeTable','design:type','i18nService','design:paramtypes','function','validationOptions','ValidatorService','details','defineProperty','validator','validatorConfig','length','date','key','(((.+)+)+)+$','Provide','Config','getAvailableLocale','2513298SWJXzV','errors','init','schema','RULES_KEY','_flags','PARAMS','type','3959550tvaFGT','value','language','error','794565bpHxNB','Singleton','../interface'];a9_0x403d=function(){return _0x4d492a;};return a9_0x403d();}a9_0xf210f9();'use strict';function a9_0xaad9(_0x51ed0c,_0x412987){const _0x1ad710=a9_0x403d();return a9_0xaad9=function(_0xf210f9,_0x3a447e){_0xf210f9=_0xf210f9-0x189;let _0x403d37=_0x1ad710[_0xf210f9];return _0x403d37;},a9_0xaad9(_0x51ed0c,_0x412987);}var __decorate=this&&this[a9_0x5944fa(0x1bc)]||function(_0x24200a,_0x56099f,_0x2be6c4,_0x3d93fd){const _0x134d06=a9_0x5944fa;var _0x29187f=arguments[_0x134d06(0x197)],_0x111fb6=_0x29187f<0x3?_0x56099f:_0x3d93fd===null?_0x3d93fd=Object[_0x134d06(0x1c2)](_0x56099f,_0x2be6c4):_0x3d93fd,_0xaec9d3;if(typeof Reflect===_0x134d06(0x1c1)&&typeof Reflect[_0x134d06(0x1c3)]==='function')_0x111fb6=Reflect[_0x134d06(0x1c3)](_0x24200a,_0x56099f,_0x2be6c4,_0x3d93fd);else{for(var _0x1b5364=_0x24200a[_0x134d06(0x197)]-0x1;_0x1b5364>=0x0;_0x1b5364--)if(_0xaec9d3=_0x24200a[_0x1b5364])_0x111fb6=(_0x29187f<0x3?_0xaec9d3(_0x111fb6):_0x29187f>0x3?_0xaec9d3(_0x56099f,_0x2be6c4,_0x111fb6):_0xaec9d3(_0x56099f,_0x2be6c4))||_0x111fb6;}return _0x29187f>0x3&&_0x111fb6&&Object[_0x134d06(0x194)](_0x56099f,_0x2be6c4,_0x111fb6),_0x111fb6;},__metadata=this&&this[a9_0x5944fa(0x1ca)]||function(_0x4e1753,_0x1bcf9c){const _0x35e42a=a9_0x5944fa;if(typeof Reflect===_0x35e42a(0x1c1)&&typeof Reflect[_0x35e42a(0x1b5)]===_0x35e42a(0x190))return Reflect[_0x35e42a(0x1b5)](_0x4e1753,_0x1bcf9c);};Object[a9_0x5944fa(0x194)](exports,'__esModule',{'value':!![]}),exports[a9_0x5944fa(0x192)]=void 0x0;const Joi=require('joi'),i18n_1=require(a9_0x5944fa(0x1ce)),core_1=require('@midwayjs/core'),interface_1=require(a9_0x5944fa(0x1ac)),ValidatorError_1=require(a9_0x5944fa(0x1bf));let ValidatorService=class ValidatorService{constructor(){const _0x43fdeb=a9_0x5944fa;this[_0x43fdeb(0x1bd)]={};}async[a9_0x5944fa(0x1a0)](){const _0x1693e0=a9_0x5944fa,_0x416959=Object['keys'](this[_0x1693e0(0x1c4)][_0x1693e0(0x18c)]);_0x416959[_0x1693e0(0x18a)](_0x424990=>{const _0x39dba6=_0x1693e0;this[_0x39dba6(0x1bd)][(0x0,i18n_1[_0x39dba6(0x18b)])(_0x424990)]=Object[_0x39dba6(0x1cc)](this[_0x39dba6(0x18e)]['getLocaleMapping'](_0x424990,'validator'));});}['getSchema'](_0x52d18b){const _0x4968aa=a9_0x5944fa,_0x42c7af=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x4968aa(0x1a2)],_0x52d18b);return _0x42c7af?Joi[_0x4968aa(0x1c1)](_0x42c7af):undefined;}['validator'](_0x46feb7,_0x26ecb5,_0x3061a9={}){const _0x30c9bd=a9_0x5944fa;var _0x324a8c,_0xb2bf8,_0x4b5b03,_0xf485d6,_0x3b9018,_0x17235a;const _0x40d18a=Joi['isSchema'](_0x46feb7)?_0x46feb7:this['getSchema'](_0x46feb7);if(!_0x40d18a)throw new AnnError(ValidatorError_1[_0x30c9bd(0x1bb)]['NOFIND_SCHEMA']);_0x3061a9[_0x30c9bd(0x191)]=Object['assign']((_0x324a8c=this['validatorConfig']['validationOptions'])!==null&&_0x324a8c!==void 0x0?_0x324a8c:{},{'messages':this[_0x30c9bd(0x1bd)]},_0x3061a9[_0x30c9bd(0x191)]||{}),_0x3061a9[_0x30c9bd(0x191)]['errors']=_0x3061a9[_0x30c9bd(0x191)]['errors']||{},_0x3061a9[_0x30c9bd(0x191)][_0x30c9bd(0x19f)][_0x30c9bd(0x1a8)]=(0x0,i18n_1['formatLocale'])(this[_0x30c9bd(0x18e)][_0x30c9bd(0x19d)](_0x3061a9['validationOptions'][_0x30c9bd(0x19f)][_0x30c9bd(0x1a8)]||_0x3061a9['locale']||this[_0x30c9bd(0x1c4)]['defaultLocale'],_0x30c9bd(0x195)));const _0x6e2e0f=_0x40d18a['validate'](_0x26ecb5,_0x3061a9[_0x30c9bd(0x191)]);if(_0x6e2e0f===null||_0x6e2e0f===void 0x0?void 0x0:_0x6e2e0f['error']){if(_0x6e2e0f[_0x30c9bd(0x1a9)]instanceof AnnError)throw _0x6e2e0f[_0x30c9bd(0x1a9)];else{if(_0x6e2e0f[_0x30c9bd(0x1a9)]instanceof Error)throw new AnnError(ValidatorError_1[_0x30c9bd(0x1bb)][_0x30c9bd(0x1a4)],{'message':((_0xb2bf8=_0x6e2e0f[_0x30c9bd(0x1a9)])===null||_0xb2bf8===void 0x0?void 0x0:_0xb2bf8[_0x30c9bd(0x1be)])||_0x30c9bd(0x1b3)});else throw new AnnError(ValidatorError_1[_0x30c9bd(0x1bb)][_0x30c9bd(0x1a4)],{'message':((_0x3b9018=(_0xf485d6=(_0x4b5b03=_0x6e2e0f['error'])===null||_0x4b5b03===void 0x0?void 0x0:_0x4b5b03[_0x30c9bd(0x193)])===null||_0xf485d6===void 0x0?void 0x0:_0xf485d6[0x0])===null||_0x3b9018===void 0x0?void 0x0:_0x3b9018[_0x30c9bd(0x1be)])||_0x30c9bd(0x1b3)});}}if(_0x6e2e0f===null||_0x6e2e0f===void 0x0?void 0x0:_0x6e2e0f[_0x30c9bd(0x1a7)]){const _0x4b8b8c=(_0x17235a=_0x40d18a===null||_0x40d18a===void 0x0?void 0x0:_0x40d18a[_0x30c9bd(0x1b2)])===null||_0x17235a===void 0x0?void 0x0:_0x17235a[_0x30c9bd(0x1b8)],_0xbff71d=function(_0x5b41ce,_0x4f11a5){const _0x3eb1e6=_0x30c9bd;var _0x2c9f0c,_0x14b851,_0x5f2fb3,_0x43a2ca,_0x30ce2f,_0x3adb99,_0x21d9d8,_0x484db0,_0x1fb953,_0x3aa59f,_0x5916af;for(let _0x2f1fc8 in _0x5b41ce){if(_0x4f11a5[(_0x2c9f0c=_0x5b41ce[_0x2f1fc8])===null||_0x2c9f0c===void 0x0?void 0x0:_0x2c9f0c[_0x3eb1e6(0x199)]]&&((_0x5f2fb3=(_0x14b851=_0x5b41ce[_0x2f1fc8])===null||_0x14b851===void 0x0?void 0x0:_0x14b851[_0x3eb1e6(0x1a1)])===null||_0x5f2fb3===void 0x0?void 0x0:_0x5f2fb3['type'])){if(((_0x30ce2f=(_0x43a2ca=_0x5b41ce[_0x2f1fc8])===null||_0x43a2ca===void 0x0?void 0x0:_0x43a2ca['schema'])===null||_0x30ce2f===void 0x0?void 0x0:_0x30ce2f[_0x3eb1e6(0x1a5)])=='object')_0x4f11a5[_0x5b41ce[_0x2f1fc8][_0x3eb1e6(0x199)]]=_0xbff71d((_0x21d9d8=(_0x3adb99=_0x5b41ce[_0x2f1fc8])===null||_0x3adb99===void 0x0?void 0x0:_0x3adb99['schema'][_0x3eb1e6(0x1b2)])===null||_0x21d9d8===void 0x0?void 0x0:_0x21d9d8[_0x3eb1e6(0x1b8)],_0x4f11a5[_0x5b41ce[_0x2f1fc8]['key']]);else{if(_0x5b41ce[_0x2f1fc8]['schema'][_0x3eb1e6(0x1a5)]==_0x3eb1e6(0x198)&&_0x6e2e0f[_0x3eb1e6(0x1a7)][(_0x484db0=_0x5b41ce[_0x2f1fc8])===null||_0x484db0===void 0x0?void 0x0:_0x484db0[_0x3eb1e6(0x199)]]){const _0x2da141=((_0x5916af=(_0x3aa59f=(_0x1fb953=_0x5b41ce[_0x2f1fc8])===null||_0x1fb953===void 0x0?void 0x0:_0x1fb953[_0x3eb1e6(0x1a1)])===null||_0x3aa59f===void 0x0?void 0x0:_0x3aa59f[_0x3eb1e6(0x1a3)])===null||_0x5916af===void 0x0?void 0x0:_0x5916af[_0x3eb1e6(0x1c8)])||_0x3eb1e6(0x189);_0x4f11a5[_0x5b41ce[_0x2f1fc8][_0x3eb1e6(0x199)]]=dayjs(_0x6e2e0f[_0x3eb1e6(0x1a7)][_0x5b41ce[_0x2f1fc8][_0x3eb1e6(0x199)]])[_0x3eb1e6(0x1c8)](_0x2da141);}}}}return _0x4f11a5;};return _0xbff71d(_0x4b8b8c,_0x6e2e0f[_0x30c9bd(0x1a7)]);}throw new AnnError(ValidatorError_1[_0x30c9bd(0x1bb)]['PARAMS']);}};exports['ValidatorService']=ValidatorService,__decorate([(0x0,core_1[a9_0x5944fa(0x19c)])(a9_0x5944fa(0x1c7)),__metadata(a9_0x5944fa(0x18d),Object)],ValidatorService['prototype'],a9_0x5944fa(0x1c4),void 0x0),__decorate([(0x0,core_1['Config'])(a9_0x5944fa(0x195)),__metadata(a9_0x5944fa(0x18d),Object)],ValidatorService[a9_0x5944fa(0x1b6)],a9_0x5944fa(0x196),void 0x0),__decorate([(0x0,core_1[a9_0x5944fa(0x1c0)])(),__metadata(a9_0x5944fa(0x18d),i18n_1[a9_0x5944fa(0x1ad)])],ValidatorService[a9_0x5944fa(0x1b6)],a9_0x5944fa(0x18e),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a9_0x5944fa(0x18d),Function),__metadata(a9_0x5944fa(0x18f),[]),__metadata(a9_0x5944fa(0x1af),Promise)],ValidatorService[a9_0x5944fa(0x1b6)],'init',null),exports[a9_0x5944fa(0x192)]=ValidatorService=__decorate([(0x0,core_1[a9_0x5944fa(0x19b)])(a9_0x5944fa(0x195)),(0x0,core_1['Scope'])(core_1[a9_0x5944fa(0x1b0)][a9_0x5944fa(0x1ab)])],ValidatorService);
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './dist/index';
|
|
3
|
-
|
|
4
|
-
declare module 'joi' {
|
|
5
|
-
|
|
6
|
-
interface DateSchema {
|
|
7
|
-
format(format: string | string[]): this;
|
|
8
|
-
utc(): this;
|
|
9
|
-
}
|
|
1
|
+
|
|
2
|
+
export * from './dist/index';
|
|
3
|
+
|
|
4
|
+
declare module 'joi' {
|
|
5
|
+
|
|
6
|
+
interface DateSchema {
|
|
7
|
+
format(format: string | string[]): this;
|
|
8
|
+
utc(): this;
|
|
9
|
+
}
|
|
10
10
|
}
|
package/locales/en_US.json
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
{
|
|
2
|
-
"alternatives.all": "{{#label}} does not match all of the required types",
|
|
3
|
-
"alternatives.any": "{{#label}} does not match any of the allowed types",
|
|
4
|
-
"alternatives.match": "{{#label}} does not match any of the allowed types",
|
|
5
|
-
"alternatives.one": "{{#label}} matches more than one allowed type",
|
|
6
|
-
"alternatives.types": "{{#label}} must be one of {{#types}}",
|
|
7
|
-
"any.custom": "{{#label}} failed custom validation because {{#error.message}}",
|
|
8
|
-
"any.default": "{{#label}} threw an error when running default method",
|
|
9
|
-
"any.failover": "{{#label}} threw an error when running failover method",
|
|
10
|
-
"any.invalid": "{{#label}} contains an invalid value",
|
|
11
|
-
"any.only": "{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}",
|
|
12
|
-
"any.ref": "{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}",
|
|
13
|
-
"any.required": "{{#label}} is required",
|
|
14
|
-
"any.unknown": "{{#label}} is not allowed",
|
|
15
|
-
"array.base": "{{#label}} must be an array",
|
|
16
|
-
"array.excludes": "{{#label}} contains an excluded value",
|
|
17
|
-
"array.hasKnown": "{{#label}} does not contain at least one required match for type {:#patternLabel}",
|
|
18
|
-
"array.hasUnknown": "{{#label}} does not contain at least one required match",
|
|
19
|
-
"array.includes": "{{#label}} does not match any of the allowed types",
|
|
20
|
-
"array.includesRequiredBoth": "{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)",
|
|
21
|
-
"array.includesRequiredKnowns": "{{#label}} does not contain {{#knownMisses}}",
|
|
22
|
-
"array.includesRequiredUnknowns": "{{#label}} does not contain {{#unknownMisses}} required value(s)",
|
|
23
|
-
"array.length": "{{#label}} must contain {{#limit}} items",
|
|
24
|
-
"array.max": "{{#label}} must contain less than or equal to {{#limit}} items",
|
|
25
|
-
"array.min": "{{#label}} must contain at least {{#limit}} items",
|
|
26
|
-
"array.orderedLength": "{{#label}} must contain at most {{#limit}} items",
|
|
27
|
-
"array.sort": "{{#label}} must be sorted in {#order} order by {{#by}}",
|
|
28
|
-
"array.sort.mismatching": "{{#label}} cannot be sorted due to mismatching types",
|
|
29
|
-
"array.sort.unsupported": "{{#label}} cannot be sorted due to unsupported type {#type}",
|
|
30
|
-
"array.sparse": "{{#label}} must not be a sparse array item",
|
|
31
|
-
"array.unique": "{{#label}} contains a duplicate value",
|
|
32
|
-
"binary.base": "{{#label}} must be a buffer or a string",
|
|
33
|
-
"binary.length": "{{#label}} must be {{#limit}} bytes",
|
|
34
|
-
"binary.max": "{{#label}} must be less than or equal to {{#limit}} bytes",
|
|
35
|
-
"binary.min": "{{#label}} must be at least {{#limit}} bytes",
|
|
36
|
-
"boolean.base": "{{#label}} must be a boolean",
|
|
37
|
-
"date.base": "{{#label}} must be a valid date",
|
|
38
|
-
"date.format": "{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format",
|
|
39
|
-
"date.greater": "{{#label}} must be greater than {{:#limit}}",
|
|
40
|
-
"date.less": "{{#label}} must be less than {{:#limit}}",
|
|
41
|
-
"date.max": "{{#label}} must be less than or equal to {{:#limit}}",
|
|
42
|
-
"date.min": "{{#label}} must be greater than or equal to {{:#limit}}",
|
|
43
|
-
"date.format.iso": "ISO 8601 date",
|
|
44
|
-
"date.format.javascript": "timestamp or number of milliseconds",
|
|
45
|
-
"date.format.unix": "timestamp or number of seconds",
|
|
46
|
-
"function.arity": "{{#label}} must have an arity of {{#n}}",
|
|
47
|
-
"function.class": "{{#label}} must be a class",
|
|
48
|
-
"function.maxArity": "{{#label}} must have an arity lesser or equal to {{#n}}",
|
|
49
|
-
"function.minArity": "{{#label}} must have an arity greater or equal to {{#n}}",
|
|
50
|
-
"object.and": "{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}",
|
|
51
|
-
"object.assert": "{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
-
"object.base": "{{#label}} must be of type {{#type}}",
|
|
53
|
-
"object.instance": "{{#label}} must be an instance of {{:#type}}",
|
|
54
|
-
"object.length": "{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
55
|
-
"object.max": "{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
56
|
-
"object.min": "{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
57
|
-
"object.missing": "{{#label}} must contain at least one of {{#peersWithLabels}}",
|
|
58
|
-
"object.nand": "{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}",
|
|
59
|
-
"object.oxor": "{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}",
|
|
60
|
-
"object.pattern.match": "{{#label}} keys failed to match pattern requirements",
|
|
61
|
-
"object.refType": "{{#label}} must be a Joi reference",
|
|
62
|
-
"object.regex": "{{#label}} must be a RegExp object",
|
|
63
|
-
"object.rename.multiple": "{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}",
|
|
64
|
-
"object.rename.override": "{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists",
|
|
65
|
-
"object.schema": "{{#label}} must be a Joi schema of {{#type}} type",
|
|
66
|
-
"object.unknown": "{{#label}} is not allowed",
|
|
67
|
-
"object.with": "{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}",
|
|
68
|
-
"object.without": "{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}",
|
|
69
|
-
"object.xor": "{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}",
|
|
70
|
-
"number.base": "{{#label}} must be a number",
|
|
71
|
-
"number.greater": "{{#label}} must be greater than {{#limit}}",
|
|
72
|
-
"number.infinity": "{{#label}} cannot be infinity",
|
|
73
|
-
"number.integer": "{{#label}} must be an integer",
|
|
74
|
-
"number.less": "{{#label}} must be less than {{#limit}}",
|
|
75
|
-
"number.max": "{{#label}} must be less than or equal to {{#limit}}",
|
|
76
|
-
"number.min": "{{#label}} must be greater than or equal to {{#limit}}",
|
|
77
|
-
"number.multiple": "{{#label}} must be a multiple of {{#multiple}}",
|
|
78
|
-
"number.negative": "{{#label}} must be a negative number",
|
|
79
|
-
"number.port": "{{#label}} must be a valid port",
|
|
80
|
-
"number.positive": "{{#label}} must be a positive number",
|
|
81
|
-
"number.precision": "{{#label}} must have no more than {{#limit}} decimal places",
|
|
82
|
-
"number.unsafe": "{{#label}} must be a safe number",
|
|
83
|
-
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
-
"string.base": "{{#label}} must be a string",
|
|
85
|
-
"string.base64": "{{#label}} must be a valid base64 string",
|
|
86
|
-
"string.creditCard": "{{#label}} must be a credit card",
|
|
87
|
-
"string.dataUri": "{{#label}} must be a valid dataUri string",
|
|
88
|
-
"string.domain": "{{#label}} must contain a valid domain name",
|
|
89
|
-
"string.email": "{{#label}} must be a valid email",
|
|
90
|
-
"string.empty": "{{#label}} is not allowed to be empty",
|
|
91
|
-
"string.guid": "{{#label}} must be a valid GUID",
|
|
92
|
-
"string.hex": "{{#label}} must only contain hexadecimal characters",
|
|
93
|
-
"string.hexAlign": "{{#label}} hex decoded representation must be byte aligned",
|
|
94
|
-
"string.hostname": "{{#label}} must be a valid hostname",
|
|
95
|
-
"string.ip": "{{#label}} must be a valid ip address with a {{#cidr}} CIDR",
|
|
96
|
-
"string.ipVersion": "{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR",
|
|
97
|
-
"string.isoDate": "{{#label}} must be in iso format",
|
|
98
|
-
"string.isoDuration": "{{#label}} must be a valid ISO 8601 duration",
|
|
99
|
-
"string.length": "{{#label}} length must be {{#limit}} characters long",
|
|
100
|
-
"string.lowercase": "{{#label}} must only contain lowercase characters",
|
|
101
|
-
"string.max": "{{#label}} length must be less than or equal to {{#limit}} characters long",
|
|
102
|
-
"string.min": "{{#label}} length must be at least {{#limit}} characters long",
|
|
103
|
-
"string.normalize": "{{#label}} must be unicode normalized in the {{#form}} form",
|
|
104
|
-
"string.token": "{{#label}} must only contain alpha-numeric and underscore characters",
|
|
105
|
-
"string.pattern.base": "{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}",
|
|
106
|
-
"string.pattern.name": "{{#label}} with value {:[.]} fails to match the {{#name}} pattern",
|
|
107
|
-
"string.pattern.invert.base": "{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}",
|
|
108
|
-
"string.pattern.invert.name": "{{#label}} with value {:[.]} matches the inverted {{#name}} pattern",
|
|
109
|
-
"string.trim": "{{#label}} must not have leading or trailing whitespace",
|
|
110
|
-
"string.uri": "{{#label}} must be a valid uri",
|
|
111
|
-
"string.uriCustomScheme": "{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern",
|
|
112
|
-
"string.uriRelativeOnly": "{{#label}} must be a valid relative uri",
|
|
113
|
-
"string.uppercase": "{{#label}} must only contain uppercase characters",
|
|
114
|
-
"symbol.base": "{{#label}} must be a symbol",
|
|
115
|
-
"symbol.map": "{{#label}} must be one of {{#map}}"
|
|
116
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"alternatives.all": "{{#label}} does not match all of the required types",
|
|
3
|
+
"alternatives.any": "{{#label}} does not match any of the allowed types",
|
|
4
|
+
"alternatives.match": "{{#label}} does not match any of the allowed types",
|
|
5
|
+
"alternatives.one": "{{#label}} matches more than one allowed type",
|
|
6
|
+
"alternatives.types": "{{#label}} must be one of {{#types}}",
|
|
7
|
+
"any.custom": "{{#label}} failed custom validation because {{#error.message}}",
|
|
8
|
+
"any.default": "{{#label}} threw an error when running default method",
|
|
9
|
+
"any.failover": "{{#label}} threw an error when running failover method",
|
|
10
|
+
"any.invalid": "{{#label}} contains an invalid value",
|
|
11
|
+
"any.only": "{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}",
|
|
12
|
+
"any.ref": "{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}",
|
|
13
|
+
"any.required": "{{#label}} is required",
|
|
14
|
+
"any.unknown": "{{#label}} is not allowed",
|
|
15
|
+
"array.base": "{{#label}} must be an array",
|
|
16
|
+
"array.excludes": "{{#label}} contains an excluded value",
|
|
17
|
+
"array.hasKnown": "{{#label}} does not contain at least one required match for type {:#patternLabel}",
|
|
18
|
+
"array.hasUnknown": "{{#label}} does not contain at least one required match",
|
|
19
|
+
"array.includes": "{{#label}} does not match any of the allowed types",
|
|
20
|
+
"array.includesRequiredBoth": "{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)",
|
|
21
|
+
"array.includesRequiredKnowns": "{{#label}} does not contain {{#knownMisses}}",
|
|
22
|
+
"array.includesRequiredUnknowns": "{{#label}} does not contain {{#unknownMisses}} required value(s)",
|
|
23
|
+
"array.length": "{{#label}} must contain {{#limit}} items",
|
|
24
|
+
"array.max": "{{#label}} must contain less than or equal to {{#limit}} items",
|
|
25
|
+
"array.min": "{{#label}} must contain at least {{#limit}} items",
|
|
26
|
+
"array.orderedLength": "{{#label}} must contain at most {{#limit}} items",
|
|
27
|
+
"array.sort": "{{#label}} must be sorted in {#order} order by {{#by}}",
|
|
28
|
+
"array.sort.mismatching": "{{#label}} cannot be sorted due to mismatching types",
|
|
29
|
+
"array.sort.unsupported": "{{#label}} cannot be sorted due to unsupported type {#type}",
|
|
30
|
+
"array.sparse": "{{#label}} must not be a sparse array item",
|
|
31
|
+
"array.unique": "{{#label}} contains a duplicate value",
|
|
32
|
+
"binary.base": "{{#label}} must be a buffer or a string",
|
|
33
|
+
"binary.length": "{{#label}} must be {{#limit}} bytes",
|
|
34
|
+
"binary.max": "{{#label}} must be less than or equal to {{#limit}} bytes",
|
|
35
|
+
"binary.min": "{{#label}} must be at least {{#limit}} bytes",
|
|
36
|
+
"boolean.base": "{{#label}} must be a boolean",
|
|
37
|
+
"date.base": "{{#label}} must be a valid date",
|
|
38
|
+
"date.format": "{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format",
|
|
39
|
+
"date.greater": "{{#label}} must be greater than {{:#limit}}",
|
|
40
|
+
"date.less": "{{#label}} must be less than {{:#limit}}",
|
|
41
|
+
"date.max": "{{#label}} must be less than or equal to {{:#limit}}",
|
|
42
|
+
"date.min": "{{#label}} must be greater than or equal to {{:#limit}}",
|
|
43
|
+
"date.format.iso": "ISO 8601 date",
|
|
44
|
+
"date.format.javascript": "timestamp or number of milliseconds",
|
|
45
|
+
"date.format.unix": "timestamp or number of seconds",
|
|
46
|
+
"function.arity": "{{#label}} must have an arity of {{#n}}",
|
|
47
|
+
"function.class": "{{#label}} must be a class",
|
|
48
|
+
"function.maxArity": "{{#label}} must have an arity lesser or equal to {{#n}}",
|
|
49
|
+
"function.minArity": "{{#label}} must have an arity greater or equal to {{#n}}",
|
|
50
|
+
"object.and": "{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}",
|
|
51
|
+
"object.assert": "{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
+
"object.base": "{{#label}} must be of type {{#type}}",
|
|
53
|
+
"object.instance": "{{#label}} must be an instance of {{:#type}}",
|
|
54
|
+
"object.length": "{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
55
|
+
"object.max": "{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
56
|
+
"object.min": "{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
57
|
+
"object.missing": "{{#label}} must contain at least one of {{#peersWithLabels}}",
|
|
58
|
+
"object.nand": "{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}",
|
|
59
|
+
"object.oxor": "{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}",
|
|
60
|
+
"object.pattern.match": "{{#label}} keys failed to match pattern requirements",
|
|
61
|
+
"object.refType": "{{#label}} must be a Joi reference",
|
|
62
|
+
"object.regex": "{{#label}} must be a RegExp object",
|
|
63
|
+
"object.rename.multiple": "{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}",
|
|
64
|
+
"object.rename.override": "{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists",
|
|
65
|
+
"object.schema": "{{#label}} must be a Joi schema of {{#type}} type",
|
|
66
|
+
"object.unknown": "{{#label}} is not allowed",
|
|
67
|
+
"object.with": "{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}",
|
|
68
|
+
"object.without": "{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}",
|
|
69
|
+
"object.xor": "{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}",
|
|
70
|
+
"number.base": "{{#label}} must be a number",
|
|
71
|
+
"number.greater": "{{#label}} must be greater than {{#limit}}",
|
|
72
|
+
"number.infinity": "{{#label}} cannot be infinity",
|
|
73
|
+
"number.integer": "{{#label}} must be an integer",
|
|
74
|
+
"number.less": "{{#label}} must be less than {{#limit}}",
|
|
75
|
+
"number.max": "{{#label}} must be less than or equal to {{#limit}}",
|
|
76
|
+
"number.min": "{{#label}} must be greater than or equal to {{#limit}}",
|
|
77
|
+
"number.multiple": "{{#label}} must be a multiple of {{#multiple}}",
|
|
78
|
+
"number.negative": "{{#label}} must be a negative number",
|
|
79
|
+
"number.port": "{{#label}} must be a valid port",
|
|
80
|
+
"number.positive": "{{#label}} must be a positive number",
|
|
81
|
+
"number.precision": "{{#label}} must have no more than {{#limit}} decimal places",
|
|
82
|
+
"number.unsafe": "{{#label}} must be a safe number",
|
|
83
|
+
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
+
"string.base": "{{#label}} must be a string",
|
|
85
|
+
"string.base64": "{{#label}} must be a valid base64 string",
|
|
86
|
+
"string.creditCard": "{{#label}} must be a credit card",
|
|
87
|
+
"string.dataUri": "{{#label}} must be a valid dataUri string",
|
|
88
|
+
"string.domain": "{{#label}} must contain a valid domain name",
|
|
89
|
+
"string.email": "{{#label}} must be a valid email",
|
|
90
|
+
"string.empty": "{{#label}} is not allowed to be empty",
|
|
91
|
+
"string.guid": "{{#label}} must be a valid GUID",
|
|
92
|
+
"string.hex": "{{#label}} must only contain hexadecimal characters",
|
|
93
|
+
"string.hexAlign": "{{#label}} hex decoded representation must be byte aligned",
|
|
94
|
+
"string.hostname": "{{#label}} must be a valid hostname",
|
|
95
|
+
"string.ip": "{{#label}} must be a valid ip address with a {{#cidr}} CIDR",
|
|
96
|
+
"string.ipVersion": "{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR",
|
|
97
|
+
"string.isoDate": "{{#label}} must be in iso format",
|
|
98
|
+
"string.isoDuration": "{{#label}} must be a valid ISO 8601 duration",
|
|
99
|
+
"string.length": "{{#label}} length must be {{#limit}} characters long",
|
|
100
|
+
"string.lowercase": "{{#label}} must only contain lowercase characters",
|
|
101
|
+
"string.max": "{{#label}} length must be less than or equal to {{#limit}} characters long",
|
|
102
|
+
"string.min": "{{#label}} length must be at least {{#limit}} characters long",
|
|
103
|
+
"string.normalize": "{{#label}} must be unicode normalized in the {{#form}} form",
|
|
104
|
+
"string.token": "{{#label}} must only contain alpha-numeric and underscore characters",
|
|
105
|
+
"string.pattern.base": "{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}",
|
|
106
|
+
"string.pattern.name": "{{#label}} with value {:[.]} fails to match the {{#name}} pattern",
|
|
107
|
+
"string.pattern.invert.base": "{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}",
|
|
108
|
+
"string.pattern.invert.name": "{{#label}} with value {:[.]} matches the inverted {{#name}} pattern",
|
|
109
|
+
"string.trim": "{{#label}} must not have leading or trailing whitespace",
|
|
110
|
+
"string.uri": "{{#label}} must be a valid uri",
|
|
111
|
+
"string.uriCustomScheme": "{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern",
|
|
112
|
+
"string.uriRelativeOnly": "{{#label}} must be a valid relative uri",
|
|
113
|
+
"string.uppercase": "{{#label}} must only contain uppercase characters",
|
|
114
|
+
"symbol.base": "{{#label}} must be a symbol",
|
|
115
|
+
"symbol.map": "{{#label}} must be one of {{#map}}"
|
|
116
|
+
}
|
package/locales/zh_CN.json
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
{
|
|
2
|
-
"alternatives.all": "{{#label}} 不能匹配上所以可选项",
|
|
3
|
-
"alternatives.any": "{{#label}} 不能匹配上任何可选项",
|
|
4
|
-
"alternatives.match": "{{#label}} 不能匹配上任何可选项",
|
|
5
|
-
"alternatives.one": "{{#label}} 匹配超过一个可选项",
|
|
6
|
-
"alternatives.types": "{{#label}} 必须是 {{#types}}",
|
|
7
|
-
"any.custom": "{{#label}} 自定义校验失败,原因为 {{#error.message}}",
|
|
8
|
-
"any.default": "{{#label}} 运行默认函数时出错",
|
|
9
|
-
"any.failover": "{{#label}} 运行 failover 函数时出错",
|
|
10
|
-
"any.invalid": "{{#label}} 不是可选值",
|
|
11
|
-
"any.only": "{{#label}} 必须是 {{#valids}} {if(#valids.length == 1, \"\", \"中的一个\")}",
|
|
12
|
-
"any.ref": "{{#label}} {{#arg}} 引用 {{:#ref}} 其中 {{#reason}}",
|
|
13
|
-
"any.required": "{{#label}} 不能为空",
|
|
14
|
-
"any.unknown": "{{#label}} 参数错误",
|
|
15
|
-
"array.base": "{{#label}} 必须是数组",
|
|
16
|
-
"array.excludes": "{{#label}} 包含非法的值",
|
|
17
|
-
"array.hasKnown": "{{#label}} 中至少一个类型为 {:#patternLabel} 的选项",
|
|
18
|
-
"array.hasUnknown": "{{#label}} 中至少有一个选项",
|
|
19
|
-
"array.includes": "{{#label}} 不能匹配任何可选项",
|
|
20
|
-
"array.includesRequiredBoth": "{{#label}} 不包含 {{#knownMisses}} 及 {{#unknownMisses}} 个必选项",
|
|
21
|
-
"array.includesRequiredKnowns": "{{#label}} 不包含 {{#knownMisses}} 等必选项",
|
|
22
|
-
"array.includesRequiredUnknowns": "{{#label}} 不包含 {{#unknownMisses}} 个必选项",
|
|
23
|
-
"array.length": "{{#label}} 必须正好包含 {{#limit}} 个成员",
|
|
24
|
-
"array.max": "{{#label}} 最多包含 {{#limit}} 个成员",
|
|
25
|
-
"array.min": "{{#label}} 至少包含 {{#limit}} 个成员",
|
|
26
|
-
"array.orderedLength": "{{#label}} 必须至少包含 {{#limit}} 个成员",
|
|
27
|
-
"array.sort": "{{#label}} 必须按 {#order} 顺序按 {{#by}} 排序",
|
|
28
|
-
"array.sort.mismatching": "{{#label}} 由于类型不匹配而无法排序",
|
|
29
|
-
"array.sort.unsupported": "{{#label}} 类型 {#type} 不支持排序",
|
|
30
|
-
"array.sparse": "{{#label}} 不能包含未定义成员",
|
|
31
|
-
"array.unique": "{{#label}} 是重复的成员",
|
|
32
|
-
"binary.base": "{{#label}} 必须是一段内容",
|
|
33
|
-
"binary.length": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
34
|
-
"binary.max": "{{#label}} 最多包含 {{#limit}} 个字节",
|
|
35
|
-
"binary.min": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
36
|
-
"boolean.base": "{{#label}} 必须是 bool 值",
|
|
37
|
-
"date.base": "{{#label}} 必须是毫秒数或者有效的时间字符串",
|
|
38
|
-
"date.format": "{{#label}} 必须是以下格式的字符串 {msg(\"date.format.\" + #format) || #format}",
|
|
39
|
-
"date.greater": "{{#label}} 必须晚于 {{:#limit}}",
|
|
40
|
-
"date.less": "{{#label}} 必须早于 {{:#limit}}",
|
|
41
|
-
"date.max": "{{#label}} 必须早于 {{:#limit}}",
|
|
42
|
-
"date.min": "{{#label}} 必须晚于 {{:#limit}}",
|
|
43
|
-
"date.format.iso": "必须是有效的\"ISO 8601\"格式的时间",
|
|
44
|
-
"date.format.javascript": "必须是有效的时间戳或者毫秒数",
|
|
45
|
-
"date.format.unix": "必须是有效的时间戳或者秒数",
|
|
46
|
-
"function.arity": "{{#label}} 必须正好拥有 {{#n}} 个参数",
|
|
47
|
-
"function.class": "{{#label}} 必须是对象类",
|
|
48
|
-
"function.maxArity": "{{#label}} 必须最多拥有 {{#n}} 个参数",
|
|
49
|
-
"function.minArity": "{{#label}} 必须至少拥有 {{#n}} 个参数",
|
|
50
|
-
"object.and": "{{#label}} 当前 {{#presentWithLabels}} 需要有对应的 {{#missingWithLabels}}",
|
|
51
|
-
"object.assert": "{{#label}} 无效,原因为 {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
-
"object.base": "{{#label}} 必须是一个对象 {{#type}}",
|
|
53
|
-
"object.instance": "{{#label}} 必须是一个 {{:#type}} 的实例",
|
|
54
|
-
"object.length": "{{#label}} 必须正好包含 {{#limit}} 个子对象",
|
|
55
|
-
"object.max": "{{#label}} 最多包含 {{#limit}} 个子对象",
|
|
56
|
-
"object.min": "{{#label}} 至少包含 {{#limit}} 个子对象",
|
|
57
|
-
"object.missing": "{{#label}} 没有对应的 {{#peersWithLabels}}",
|
|
58
|
-
"object.nand": "{{:#mainWithLabel}} 不得与 {{#peersWithLabels}} 同时存在",
|
|
59
|
-
"object.oxor": "{{#label}} 和 {{#peerWithLabels}} 有冲突",
|
|
60
|
-
"object.pattern.match": "{{#label}} 键匹配失败",
|
|
61
|
-
"object.refType": "{{#label}} 必须是 Joi 引用",
|
|
62
|
-
"object.regex": "{{#label}} 必须是正则对象",
|
|
63
|
-
"object.rename.multiple": "{{#label}} 无法重命名 {{:#from}} 因为多次重命名被禁用并且另一个键已经重命名为 {{:#to}}",
|
|
64
|
-
"object.rename.override": "{{#label}} 无法重命名 {{:#from}} 因为覆盖被禁用并且目标 {{:#to}} 存在",
|
|
65
|
-
"object.schema": "{{#label}} 必须是 {{#type}} 类型的 Joi Schema",
|
|
66
|
-
"object.unknown": "{{#label}} 不被允许",
|
|
67
|
-
"object.with": "{{:#mainWithLabel}} 缺少必需的对等方 {{:#peerWithLabel}}",
|
|
68
|
-
"object.without": "{{:#mainWithLabel}} 与禁止的节点冲突 {{:#peerWithLabel}}",
|
|
69
|
-
"object.xor": "{{#label}} 包含独占对等体之间的冲突 {{#peersWithLabels}}",
|
|
70
|
-
"number.base": "{{#label}} 必须是数值",
|
|
71
|
-
"number.greater": "{{#label}} 必须大于 {{#limit}}",
|
|
72
|
-
"number.infinity": "{{#label}} 不能是无穷大",
|
|
73
|
-
"number.integer": "{{#label}} 必须是整数",
|
|
74
|
-
"number.less": "{{#label}} 必须小于 {{#limit}}",
|
|
75
|
-
"number.max": "{{#label}} 必须小于或等于 {{#limit}}",
|
|
76
|
-
"number.min": "{{#label}} 必须大于或等于 {{#limit}}",
|
|
77
|
-
"number.multiple": "{{#label}} 必须是 {{#multiple}} 的倍数",
|
|
78
|
-
"number.negative": "{{#label}} 必须是负数",
|
|
79
|
-
"number.port": "{{#label}} 必须是有效的端口号",
|
|
80
|
-
"number.positive": "{{#label}} 必须是正数",
|
|
81
|
-
"number.precision": "{{#label}} 必须有 {{#limit}} 位小数",
|
|
82
|
-
"number.unsafe": "{{#label}} 必须是安全号码",
|
|
83
|
-
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
-
"string.base": "{{#label}} 必须是字符串",
|
|
85
|
-
"string.base64": "{{#label}} 必须是有效的 base64 字符串",
|
|
86
|
-
"string.creditCard": "{{#label}} 必须是有效的信用卡号",
|
|
87
|
-
"string.dataUri": "{{#label}} 必须是有效的 dataUri 字符串",
|
|
88
|
-
"string.domain": "{{#label}} 必须包含有效的域名",
|
|
89
|
-
"string.email": "{{#label}} 必须是有效的电子邮件",
|
|
90
|
-
"string.empty": "{{#label}} 不能为空",
|
|
91
|
-
"string.guid": "{{#label}} 必须是有效的 GUID",
|
|
92
|
-
"string.hex": "{{#label}} 只能包含十六进制字符",
|
|
93
|
-
"string.hexAlign": "{{#label}} 十六进制解码表示必须字节对齐",
|
|
94
|
-
"string.hostname": "{{#label}} 必须是有效的主机名",
|
|
95
|
-
"string.ip": "{{#label}} 必须是具有 {{#cidr}} CIDR 的有效 IP 地址",
|
|
96
|
-
"string.ipVersion": "{{#label}} 必须是以下版本之一的有效 IP 地址 {{#version}} 和 {{#cidr}} CIDR",
|
|
97
|
-
"string.isoDate": "{{#label}} 必须是 iso 格式",
|
|
98
|
-
"string.isoDuration": "{{#label}} 必须是有效的 ISO 8601 持续时间",
|
|
99
|
-
"string.length": "{{#label}} 长度必须为 {{#limit}} 个字符长",
|
|
100
|
-
"string.lowercase": "{{#label}} 只能包含小写字符",
|
|
101
|
-
"string.max": "{{#label}} 长度必须小于或等于 {{#limit}} 个字符长",
|
|
102
|
-
"string.min": "{{#label}} 长度必须至少为 {{#limit}} 个字符长",
|
|
103
|
-
"string.normalize": "{{#label}} 必须以 {{#form}} 形式进行 unicode 规范化",
|
|
104
|
-
"string.token": "{{#label}} 只能包含字母数字和下划线字符",
|
|
105
|
-
"string.pattern.base": "{{#label}} 的值为 {:[.]} 未能匹配所需的模式:{{#regex}}",
|
|
106
|
-
"string.pattern.name": "{{#label}} 值为 {:[.]} 未能匹配 {{#name}} 模式",
|
|
107
|
-
"string.pattern.invert.base": "{{#label}} 与值 {:[.]} 匹配反转模式:{{#regex}}",
|
|
108
|
-
"string.pattern.invert.name": "{{#label}} 与值 {:[.]} 匹配倒置的 {{#name}} 模式",
|
|
109
|
-
"string.trim": "{{#label}} 不得前后空格",
|
|
110
|
-
"string.uri": "{{#label}} 必须是有效的 uri",
|
|
111
|
-
"string.uriCustomScheme": "{{#label}} 必须是有效的 uri,其方案与 {{#scheme}} 模式匹配",
|
|
112
|
-
"string.uriRelativeOnly": "{{#label}} 必须是有效的相对 uri",
|
|
113
|
-
"string.uppercase": "{{#label}} 只能包含大写字符",
|
|
114
|
-
"symbol.base": "{{#label}} 必须是符号",
|
|
115
|
-
"symbol.map": "{{#label}} 必须是 {{#map}} 之一"
|
|
116
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"alternatives.all": "{{#label}} 不能匹配上所以可选项",
|
|
3
|
+
"alternatives.any": "{{#label}} 不能匹配上任何可选项",
|
|
4
|
+
"alternatives.match": "{{#label}} 不能匹配上任何可选项",
|
|
5
|
+
"alternatives.one": "{{#label}} 匹配超过一个可选项",
|
|
6
|
+
"alternatives.types": "{{#label}} 必须是 {{#types}}",
|
|
7
|
+
"any.custom": "{{#label}} 自定义校验失败,原因为 {{#error.message}}",
|
|
8
|
+
"any.default": "{{#label}} 运行默认函数时出错",
|
|
9
|
+
"any.failover": "{{#label}} 运行 failover 函数时出错",
|
|
10
|
+
"any.invalid": "{{#label}} 不是可选值",
|
|
11
|
+
"any.only": "{{#label}} 必须是 {{#valids}} {if(#valids.length == 1, \"\", \"中的一个\")}",
|
|
12
|
+
"any.ref": "{{#label}} {{#arg}} 引用 {{:#ref}} 其中 {{#reason}}",
|
|
13
|
+
"any.required": "{{#label}} 不能为空",
|
|
14
|
+
"any.unknown": "{{#label}} 参数错误",
|
|
15
|
+
"array.base": "{{#label}} 必须是数组",
|
|
16
|
+
"array.excludes": "{{#label}} 包含非法的值",
|
|
17
|
+
"array.hasKnown": "{{#label}} 中至少一个类型为 {:#patternLabel} 的选项",
|
|
18
|
+
"array.hasUnknown": "{{#label}} 中至少有一个选项",
|
|
19
|
+
"array.includes": "{{#label}} 不能匹配任何可选项",
|
|
20
|
+
"array.includesRequiredBoth": "{{#label}} 不包含 {{#knownMisses}} 及 {{#unknownMisses}} 个必选项",
|
|
21
|
+
"array.includesRequiredKnowns": "{{#label}} 不包含 {{#knownMisses}} 等必选项",
|
|
22
|
+
"array.includesRequiredUnknowns": "{{#label}} 不包含 {{#unknownMisses}} 个必选项",
|
|
23
|
+
"array.length": "{{#label}} 必须正好包含 {{#limit}} 个成员",
|
|
24
|
+
"array.max": "{{#label}} 最多包含 {{#limit}} 个成员",
|
|
25
|
+
"array.min": "{{#label}} 至少包含 {{#limit}} 个成员",
|
|
26
|
+
"array.orderedLength": "{{#label}} 必须至少包含 {{#limit}} 个成员",
|
|
27
|
+
"array.sort": "{{#label}} 必须按 {#order} 顺序按 {{#by}} 排序",
|
|
28
|
+
"array.sort.mismatching": "{{#label}} 由于类型不匹配而无法排序",
|
|
29
|
+
"array.sort.unsupported": "{{#label}} 类型 {#type} 不支持排序",
|
|
30
|
+
"array.sparse": "{{#label}} 不能包含未定义成员",
|
|
31
|
+
"array.unique": "{{#label}} 是重复的成员",
|
|
32
|
+
"binary.base": "{{#label}} 必须是一段内容",
|
|
33
|
+
"binary.length": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
34
|
+
"binary.max": "{{#label}} 最多包含 {{#limit}} 个字节",
|
|
35
|
+
"binary.min": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
36
|
+
"boolean.base": "{{#label}} 必须是 bool 值",
|
|
37
|
+
"date.base": "{{#label}} 必须是毫秒数或者有效的时间字符串",
|
|
38
|
+
"date.format": "{{#label}} 必须是以下格式的字符串 {msg(\"date.format.\" + #format) || #format}",
|
|
39
|
+
"date.greater": "{{#label}} 必须晚于 {{:#limit}}",
|
|
40
|
+
"date.less": "{{#label}} 必须早于 {{:#limit}}",
|
|
41
|
+
"date.max": "{{#label}} 必须早于 {{:#limit}}",
|
|
42
|
+
"date.min": "{{#label}} 必须晚于 {{:#limit}}",
|
|
43
|
+
"date.format.iso": "必须是有效的\"ISO 8601\"格式的时间",
|
|
44
|
+
"date.format.javascript": "必须是有效的时间戳或者毫秒数",
|
|
45
|
+
"date.format.unix": "必须是有效的时间戳或者秒数",
|
|
46
|
+
"function.arity": "{{#label}} 必须正好拥有 {{#n}} 个参数",
|
|
47
|
+
"function.class": "{{#label}} 必须是对象类",
|
|
48
|
+
"function.maxArity": "{{#label}} 必须最多拥有 {{#n}} 个参数",
|
|
49
|
+
"function.minArity": "{{#label}} 必须至少拥有 {{#n}} 个参数",
|
|
50
|
+
"object.and": "{{#label}} 当前 {{#presentWithLabels}} 需要有对应的 {{#missingWithLabels}}",
|
|
51
|
+
"object.assert": "{{#label}} 无效,原因为 {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
+
"object.base": "{{#label}} 必须是一个对象 {{#type}}",
|
|
53
|
+
"object.instance": "{{#label}} 必须是一个 {{:#type}} 的实例",
|
|
54
|
+
"object.length": "{{#label}} 必须正好包含 {{#limit}} 个子对象",
|
|
55
|
+
"object.max": "{{#label}} 最多包含 {{#limit}} 个子对象",
|
|
56
|
+
"object.min": "{{#label}} 至少包含 {{#limit}} 个子对象",
|
|
57
|
+
"object.missing": "{{#label}} 没有对应的 {{#peersWithLabels}}",
|
|
58
|
+
"object.nand": "{{:#mainWithLabel}} 不得与 {{#peersWithLabels}} 同时存在",
|
|
59
|
+
"object.oxor": "{{#label}} 和 {{#peerWithLabels}} 有冲突",
|
|
60
|
+
"object.pattern.match": "{{#label}} 键匹配失败",
|
|
61
|
+
"object.refType": "{{#label}} 必须是 Joi 引用",
|
|
62
|
+
"object.regex": "{{#label}} 必须是正则对象",
|
|
63
|
+
"object.rename.multiple": "{{#label}} 无法重命名 {{:#from}} 因为多次重命名被禁用并且另一个键已经重命名为 {{:#to}}",
|
|
64
|
+
"object.rename.override": "{{#label}} 无法重命名 {{:#from}} 因为覆盖被禁用并且目标 {{:#to}} 存在",
|
|
65
|
+
"object.schema": "{{#label}} 必须是 {{#type}} 类型的 Joi Schema",
|
|
66
|
+
"object.unknown": "{{#label}} 不被允许",
|
|
67
|
+
"object.with": "{{:#mainWithLabel}} 缺少必需的对等方 {{:#peerWithLabel}}",
|
|
68
|
+
"object.without": "{{:#mainWithLabel}} 与禁止的节点冲突 {{:#peerWithLabel}}",
|
|
69
|
+
"object.xor": "{{#label}} 包含独占对等体之间的冲突 {{#peersWithLabels}}",
|
|
70
|
+
"number.base": "{{#label}} 必须是数值",
|
|
71
|
+
"number.greater": "{{#label}} 必须大于 {{#limit}}",
|
|
72
|
+
"number.infinity": "{{#label}} 不能是无穷大",
|
|
73
|
+
"number.integer": "{{#label}} 必须是整数",
|
|
74
|
+
"number.less": "{{#label}} 必须小于 {{#limit}}",
|
|
75
|
+
"number.max": "{{#label}} 必须小于或等于 {{#limit}}",
|
|
76
|
+
"number.min": "{{#label}} 必须大于或等于 {{#limit}}",
|
|
77
|
+
"number.multiple": "{{#label}} 必须是 {{#multiple}} 的倍数",
|
|
78
|
+
"number.negative": "{{#label}} 必须是负数",
|
|
79
|
+
"number.port": "{{#label}} 必须是有效的端口号",
|
|
80
|
+
"number.positive": "{{#label}} 必须是正数",
|
|
81
|
+
"number.precision": "{{#label}} 必须有 {{#limit}} 位小数",
|
|
82
|
+
"number.unsafe": "{{#label}} 必须是安全号码",
|
|
83
|
+
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
+
"string.base": "{{#label}} 必须是字符串",
|
|
85
|
+
"string.base64": "{{#label}} 必须是有效的 base64 字符串",
|
|
86
|
+
"string.creditCard": "{{#label}} 必须是有效的信用卡号",
|
|
87
|
+
"string.dataUri": "{{#label}} 必须是有效的 dataUri 字符串",
|
|
88
|
+
"string.domain": "{{#label}} 必须包含有效的域名",
|
|
89
|
+
"string.email": "{{#label}} 必须是有效的电子邮件",
|
|
90
|
+
"string.empty": "{{#label}} 不能为空",
|
|
91
|
+
"string.guid": "{{#label}} 必须是有效的 GUID",
|
|
92
|
+
"string.hex": "{{#label}} 只能包含十六进制字符",
|
|
93
|
+
"string.hexAlign": "{{#label}} 十六进制解码表示必须字节对齐",
|
|
94
|
+
"string.hostname": "{{#label}} 必须是有效的主机名",
|
|
95
|
+
"string.ip": "{{#label}} 必须是具有 {{#cidr}} CIDR 的有效 IP 地址",
|
|
96
|
+
"string.ipVersion": "{{#label}} 必须是以下版本之一的有效 IP 地址 {{#version}} 和 {{#cidr}} CIDR",
|
|
97
|
+
"string.isoDate": "{{#label}} 必须是 iso 格式",
|
|
98
|
+
"string.isoDuration": "{{#label}} 必须是有效的 ISO 8601 持续时间",
|
|
99
|
+
"string.length": "{{#label}} 长度必须为 {{#limit}} 个字符长",
|
|
100
|
+
"string.lowercase": "{{#label}} 只能包含小写字符",
|
|
101
|
+
"string.max": "{{#label}} 长度必须小于或等于 {{#limit}} 个字符长",
|
|
102
|
+
"string.min": "{{#label}} 长度必须至少为 {{#limit}} 个字符长",
|
|
103
|
+
"string.normalize": "{{#label}} 必须以 {{#form}} 形式进行 unicode 规范化",
|
|
104
|
+
"string.token": "{{#label}} 只能包含字母数字和下划线字符",
|
|
105
|
+
"string.pattern.base": "{{#label}} 的值为 {:[.]} 未能匹配所需的模式:{{#regex}}",
|
|
106
|
+
"string.pattern.name": "{{#label}} 值为 {:[.]} 未能匹配 {{#name}} 模式",
|
|
107
|
+
"string.pattern.invert.base": "{{#label}} 与值 {:[.]} 匹配反转模式:{{#regex}}",
|
|
108
|
+
"string.pattern.invert.name": "{{#label}} 与值 {:[.]} 匹配倒置的 {{#name}} 模式",
|
|
109
|
+
"string.trim": "{{#label}} 不得前后空格",
|
|
110
|
+
"string.uri": "{{#label}} 必须是有效的 uri",
|
|
111
|
+
"string.uriCustomScheme": "{{#label}} 必须是有效的 uri,其方案与 {{#scheme}} 模式匹配",
|
|
112
|
+
"string.uriRelativeOnly": "{{#label}} 必须是有效的相对 uri",
|
|
113
|
+
"string.uppercase": "{{#label}} 只能包含大写字符",
|
|
114
|
+
"symbol.base": "{{#label}} 必须是符号",
|
|
115
|
+
"symbol.map": "{{#label}} 必须是 {{#map}} 之一"
|
|
116
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.7",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^3.4.
|
|
20
|
+
"@anncic-api/core": "^3.4.7",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.11.0"
|
|
23
23
|
},
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"javascript-obfuscator": "^4.0.2",
|
|
27
27
|
"typescript": "^5.1.3"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "b72cb1404bfdf04be08f53d43e4171c3349c2637"
|
|
30
30
|
}
|