@anncic-api/validator 3.4.3 → 3.4.4
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
|
-
|
|
1
|
+
const a0_0x4b85f0=a0_0x65aa;(function(_0x477651,_0x4e1637){const _0x18ab1a=a0_0x65aa,_0xada0f6=_0x477651();while(!![]){try{const _0xc90e10=parseInt(_0x18ab1a(0x139))/0x1*(parseInt(_0x18ab1a(0x140))/0x2)+-parseInt(_0x18ab1a(0x130))/0x3*(-parseInt(_0x18ab1a(0x13e))/0x4)+parseInt(_0x18ab1a(0x144))/0x5+parseInt(_0x18ab1a(0x13a))/0x6*(parseInt(_0x18ab1a(0x12f))/0x7)+parseInt(_0x18ab1a(0x133))/0x8*(parseInt(_0x18ab1a(0x136))/0x9)+parseInt(_0x18ab1a(0x12e))/0xa*(parseInt(_0x18ab1a(0x132))/0xb)+-parseInt(_0x18ab1a(0x13d))/0xc;if(_0xc90e10===_0x4e1637)break;else _0xada0f6['push'](_0xada0f6['shift']());}catch(_0xa1f30c){_0xada0f6['push'](_0xada0f6['shift']());}}}(a0_0x33fe,0x40e8f));const a0_0x17dd0a=(function(){let _0xb771cd=!![];return function(_0x3d5d41,_0x24bfd1){const _0xc7475c=_0xb771cd?function(){const _0xeb3c95=a0_0x65aa;if(_0x24bfd1){const _0x1b257a=_0x24bfd1[_0xeb3c95(0x13c)](_0x3d5d41,arguments);return _0x24bfd1=null,_0x1b257a;}}:function(){};return _0xb771cd=![],_0xc7475c;};}()),a0_0xbe39fd=a0_0x17dd0a(this,function(){const _0x2e4b3a=a0_0x65aa;return a0_0xbe39fd[_0x2e4b3a(0x137)]()['search'](_0x2e4b3a(0x142))['toString']()['constructor'](a0_0xbe39fd)[_0x2e4b3a(0x143)](_0x2e4b3a(0x142));});a0_0xbe39fd();'use strict';Object[a0_0x4b85f0(0x134)](exports,a0_0x4b85f0(0x13b),{'value':!![]});const ValidatorError_1=require(a0_0x4b85f0(0x138));function a0_0x65aa(_0x3b4745,_0x1e0bcc){const _0x2ee6d7=a0_0x33fe();return a0_0x65aa=function(_0xbe39fd,_0x17dd0a){_0xbe39fd=_0xbe39fd-0x12d;let _0x33febd=_0x2ee6d7[_0xbe39fd];return _0x33febd;},a0_0x65aa(_0x3b4745,_0x1e0bcc);}exports['default']={'validator':{'errorStatus':ValidatorError_1[a0_0x4b85f0(0x141)][a0_0x4b85f0(0x131)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x4b85f0(0x12d)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x4b85f0(0x135))},'zh_CN':{'validator':require(a0_0x4b85f0(0x13f))}}}};function a0_0x33fe(){const _0xf03d12=['../../locales/en_US.json','261YSFQEO','toString','../exception/ValidatorError','1azIvEh','414TDZWjF','__esModule','apply','23197872HHPLAQ','1862920QfHBGC','../../locales/zh_CN.json','374062OoIAgq','ValidatorError','(((.+)+)+)+$','search','1658430RwQwfU','string','38550lasGZl','44653TgEMiT','3NcRuiK','PARAMS','1364utajfA','81768ellhBT','defineProperty'];a0_0x33fe=function(){return _0xf03d12;};return a0_0x33fe();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x29f0ea=a1_0x4a21;(function(_0x562a10,_0x4fc5ad){const _0x42c405=a1_0x4a21,_0x1d49f6=_0x562a10();while(!![]){try{const _0x52d70f=-parseInt(_0x42c405(0x162))/0x1+-parseInt(_0x42c405(0x150))/0x2*(-parseInt(_0x42c405(0x151))/0x3)+-parseInt(_0x42c405(0x165))/0x4*(parseInt(_0x42c405(0x145))/0x5)+-parseInt(_0x42c405(0x13f))/0x6*(parseInt(_0x42c405(0x137))/0x7)+parseInt(_0x42c405(0x139))/0x8*(parseInt(_0x42c405(0x160))/0x9)+parseInt(_0x42c405(0x167))/0xa*(-parseInt(_0x42c405(0x16d))/0xb)+parseInt(_0x42c405(0x14c))/0xc*(parseInt(_0x42c405(0x16a))/0xd);if(_0x52d70f===_0x4fc5ad)break;else _0x1d49f6['push'](_0x1d49f6['shift']());}catch(_0x309c2d){_0x1d49f6['push'](_0x1d49f6['shift']());}}}(a1_0x4110,0x3e512));const a1_0x3e3ef0=(function(){let _0x1528d6=!![];return function(_0x3124ab,_0x486350){const _0x3d484f=_0x1528d6?function(){if(_0x486350){const _0x1f53a1=_0x486350['apply'](_0x3124ab,arguments);return _0x486350=null,_0x1f53a1;}}:function(){};return _0x1528d6=![],_0x3d484f;};}()),a1_0x5781d7=a1_0x3e3ef0(this,function(){const _0x179d9e=a1_0x4a21;return a1_0x5781d7['toString']()[_0x179d9e(0x147)](_0x179d9e(0x14d))[_0x179d9e(0x149)]()[_0x179d9e(0x143)](a1_0x5781d7)['search']('(((.+)+)+)+$');});a1_0x5781d7();'use strict';var __decorate=this&&this[a1_0x29f0ea(0x13b)]||function(_0x52f666,_0x203152,_0x367238,_0x2da66f){const _0x20d429=a1_0x29f0ea;var _0x2a440e=arguments[_0x20d429(0x153)],_0x2877f0=_0x2a440e<0x3?_0x203152:_0x2da66f===null?_0x2da66f=Object[_0x20d429(0x168)](_0x203152,_0x367238):_0x2da66f,_0x1c33b1;if(typeof Reflect===_0x20d429(0x164)&&typeof Reflect[_0x20d429(0x138)]==='function')_0x2877f0=Reflect[_0x20d429(0x138)](_0x52f666,_0x203152,_0x367238,_0x2da66f);else{for(var _0x3e20a2=_0x52f666[_0x20d429(0x153)]-0x1;_0x3e20a2>=0x0;_0x3e20a2--)if(_0x1c33b1=_0x52f666[_0x3e20a2])_0x2877f0=(_0x2a440e<0x3?_0x1c33b1(_0x2877f0):_0x2a440e>0x3?_0x1c33b1(_0x203152,_0x367238,_0x2877f0):_0x1c33b1(_0x203152,_0x367238))||_0x2877f0;}return _0x2a440e>0x3&&_0x2877f0&&Object[_0x20d429(0x16c)](_0x203152,_0x367238,_0x2877f0),_0x2877f0;},__metadata=this&&this['__metadata']||function(_0x500c38,_0x5e8fd7){const _0x4a5299=a1_0x29f0ea;if(typeof Reflect==='object'&&typeof Reflect[_0x4a5299(0x135)]===_0x4a5299(0x13c))return Reflect[_0x4a5299(0x135)](_0x500c38,_0x5e8fd7);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a1_0x29f0ea(0x156)]=void 0x0;const i18n_1=require(a1_0x29f0ea(0x171)),core_1=require(a1_0x29f0ea(0x157)),core_2=require(a1_0x29f0ea(0x157)),interface_1=require(a1_0x29f0ea(0x141)),ValidatorService_1=require(a1_0x29f0ea(0x173)),i18n=require(a1_0x29f0ea(0x171)),anncic=require('@anncic-api/core'),ConfigDefault=require(a1_0x29f0ea(0x142));function a1_0x4110(){const _0x648981=['methodName','decorator','design:type','anncic-api:validator','onReady','9lDSxfu','splice','241507iEhLjU','args','object','724sBIRFT','req','20ZLMYTZ','getOwnPropertyDescriptor','locale','208KAsIXF','method','defineProperty','319462mcMTLj','getClassMetadata','Configuration','param','@midwayjs/i18n','request','./service/ValidatorService','metadata','VALIDATOR_KEY','1594579yPEJRe','decorate','711792uADsDG','params','__decorate','function','target','undefined','6caONyM','Inject','./interface','./config/config.default','constructor','query','12490RQrLWo','assign','search','bound\x20dispatch','toString','res','validator','751188apGfQL','(((.+)+)+)+$','REQUEST_OBJ_CTX_KEY','ValidatorService','288436szbNTa','3MxtSzL','find','length','methodArgs','getMethodParamTypes','CustomConfiguration','@midwayjs/core','propertyName','getAttr','name'];a1_0x4110=function(){return _0x648981;};return a1_0x4110();}let CustomConfiguration=exports[a1_0x29f0ea(0x156)]=class CustomConfiguration{async[a1_0x29f0ea(0x15f)](){const _0x157b30=a1_0x29f0ea;this[_0x157b30(0x15c)]['registerMethodHandler'](interface_1['VALIDATOR_KEY'],_0xb969f2=>{const _0x421e34=_0x157b30,_0xe72006=_0xb969f2['metadata'],_0x30901b=(0x0,core_2[_0x421e34(0x155)])(_0xb969f2[_0x421e34(0x13d)],_0xb969f2[_0x421e34(0x158)]);return{'before':_0x151242=>{const _0x244bb6=_0x421e34;var _0x6df937,_0x153b26,_0x5625e9,_0x5ef4c3,_0x642e5d,_0x4c328c,_0x548f47,_0x1777de,_0x557f1a,_0x4cdc56,_0xde69aa,_0x5bed84,_0x1322ae;const _0x2e021b=_0x151242[_0x244bb6(0x13d)][core_1[_0x244bb6(0x14e)]],_0x229d9f=Object[_0x244bb6(0x146)]({},((_0x6df937=_0x2e021b===null||_0x2e021b===void 0x0?void 0x0:_0x2e021b[_0x244bb6(0x172)])===null||_0x6df937===void 0x0?void 0x0:_0x6df937[_0x244bb6(0x144)])||{},((_0x153b26=_0x2e021b===null||_0x2e021b===void 0x0?void 0x0:_0x2e021b[_0x244bb6(0x172)])===null||_0x153b26===void 0x0?void 0x0:_0x153b26['body'])||{}),_0x21f250=((0x0,core_2[_0x244bb6(0x16e)])(interface_1[_0x244bb6(0x136)],_0x151242['target'])||[])[_0x244bb6(0x152)](_0xdfb7b2=>_0xdfb7b2[_0x244bb6(0x16b)]==_0x151242[_0x244bb6(0x15b)]);!(_0xe72006===null||_0xe72006===void 0x0?void 0x0:_0xe72006[_0x244bb6(0x169)])&&_0x2e021b&&_0x2e021b[_0x244bb6(0x159)]&&(_0xe72006[_0x244bb6(0x169)]=_0x2e021b['getAttr'](i18n_1['I18N_ATTR_KEY']));for(let _0x514970=0x0;_0x514970<_0x30901b[_0x244bb6(0x153)];_0x514970++){const _0x5118a6=_0x30901b[_0x514970],_0x11b499=this[_0x244bb6(0x14f)]['getSchema'](_0x5118a6);if(_0x11b499){if(typeof _0x151242[_0x244bb6(0x163)][_0x514970]==_0x244bb6(0x13e)||((_0x5625e9=_0x151242[_0x244bb6(0x163)][_0x514970])===null||_0x5625e9===void 0x0?void 0x0:_0x5625e9[_0x244bb6(0x172)])&&((_0x5ef4c3=_0x151242[_0x244bb6(0x163)][_0x514970])===null||_0x5ef4c3===void 0x0?void 0x0:_0x5ef4c3[_0x244bb6(0x14a)])&&((_0x642e5d=_0x151242['args'][_0x514970])===null||_0x642e5d===void 0x0?void 0x0:_0x642e5d[_0x244bb6(0x166)]))_0x151242[_0x244bb6(0x163)][_0x514970]=_0x229d9f;else((_0x4c328c=_0x151242[_0x244bb6(0x163)][_0x514970])===null||_0x4c328c===void 0x0?void 0x0:_0x4c328c[_0x244bb6(0x15a)])==_0x244bb6(0x148)&&_0x151242[_0x244bb6(0x163)][_0x244bb6(0x161)](_0x514970,0x0,_0x229d9f);const _0x50c36a=this[_0x244bb6(0x14f)][_0x244bb6(0x14b)](_0x11b499,_0x151242[_0x244bb6(0x163)][_0x514970],_0xe72006);_0x50c36a&&(_0x151242[_0x244bb6(0x163)][_0x514970]=_0x50c36a);}else{if((_0x21f250===null||_0x21f250===void 0x0?void 0x0:_0x21f250[_0x244bb6(0x154)][_0x514970])&&((_0x548f47=_0x151242[_0x244bb6(0x163)][_0x514970])===null||_0x548f47===void 0x0?void 0x0:_0x548f47[_0x244bb6(0x13a)])&&typeof _0x151242[_0x244bb6(0x163)][_0x514970][_0x244bb6(0x170)]==_0x244bb6(0x13c)&&((_0x1777de=_0x2e021b===null||_0x2e021b===void 0x0?void 0x0:_0x2e021b['params'])===null||_0x1777de===void 0x0?void 0x0:_0x1777de[_0x21f250[_0x244bb6(0x154)][_0x514970]]))_0x151242[_0x244bb6(0x163)][_0x514970]=_0x5118a6((_0x557f1a=_0x2e021b===null||_0x2e021b===void 0x0?void 0x0:_0x2e021b[_0x244bb6(0x13a)])===null||_0x557f1a===void 0x0?void 0x0:_0x557f1a[_0x21f250[_0x244bb6(0x154)][_0x514970]]);else(_0x21f250===null||_0x21f250===void 0x0?void 0x0:_0x21f250[_0x244bb6(0x154)][_0x514970])&&((_0xde69aa=(_0x4cdc56=_0x151242['args'][_0x514970])===null||_0x4cdc56===void 0x0?void 0x0:_0x4cdc56[_0x244bb6(0x13a)])===null||_0xde69aa===void 0x0?void 0x0:_0xde69aa[_0x21f250['methodArgs'][_0x514970]])&&(_0x151242[_0x244bb6(0x163)][_0x514970]=(_0x1322ae=(_0x5bed84=_0x151242['args'][_0x514970])===null||_0x5bed84===void 0x0?void 0x0:_0x5bed84['params'])===null||_0x1322ae===void 0x0?void 0x0:_0x1322ae[_0x21f250['methodArgs'][_0x514970]]);}}},'afterThrow':(_0x2ffe7a,_0x25e6e8)=>{throw _0x25e6e8;}};});}};function a1_0x4a21(_0x24ad03,_0x3ecf4a){const _0x3fa688=a1_0x4110();return a1_0x4a21=function(_0x5781d7,_0x3e3ef0){_0x5781d7=_0x5781d7-0x135;let _0x411046=_0x3fa688[_0x5781d7];return _0x411046;},a1_0x4a21(_0x24ad03,_0x3ecf4a);}__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x29f0ea(0x15d),core_1['MidwayDecoratorService'])],CustomConfiguration['prototype'],a1_0x29f0ea(0x15c),void 0x0),__decorate([(0x0,core_2[a1_0x29f0ea(0x140)])(),__metadata('design:type',ValidatorService_1[a1_0x29f0ea(0x14f)])],CustomConfiguration['prototype'],a1_0x29f0ea(0x14f),void 0x0),exports[a1_0x29f0ea(0x156)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x29f0ea(0x16f)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x29f0ea(0x15e),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x877200=a2_0x31ee;(function(_0x40912f,_0x4eb45d){const _0x3fe79b=a2_0x31ee,_0x522b7b=_0x40912f();while(!![]){try{const _0x415730=-parseInt(_0x3fe79b(0x9d))/0x1+-parseInt(_0x3fe79b(0x9c))/0x2*(parseInt(_0x3fe79b(0x96))/0x3)+parseInt(_0x3fe79b(0xb5))/0x4*(parseInt(_0x3fe79b(0x91))/0x5)+-parseInt(_0x3fe79b(0xa5))/0x6*(parseInt(_0x3fe79b(0xab))/0x7)+parseInt(_0x3fe79b(0xa2))/0x8*(parseInt(_0x3fe79b(0xa1))/0x9)+parseInt(_0x3fe79b(0x95))/0xa+-parseInt(_0x3fe79b(0x98))/0xb*(-parseInt(_0x3fe79b(0x93))/0xc);if(_0x415730===_0x4eb45d)break;else _0x522b7b['push'](_0x522b7b['shift']());}catch(_0x2324f6){_0x522b7b['push'](_0x522b7b['shift']());}}}(a2_0x460b,0xf1745));const a2_0x318f8c=(function(){let _0x36c451=!![];return function(_0x235591,_0x57e35a){const _0x17f725=_0x36c451?function(){if(_0x57e35a){const _0x3469f=_0x57e35a['apply'](_0x235591,arguments);return _0x57e35a=null,_0x3469f;}}:function(){};return _0x36c451=![],_0x17f725;};}()),a2_0x4b90a1=a2_0x318f8c(this,function(){const _0x16756a=a2_0x31ee;return a2_0x4b90a1['toString']()[_0x16756a(0xa9)](_0x16756a(0x90))[_0x16756a(0xa0)]()[_0x16756a(0xad)](a2_0x4b90a1)[_0x16756a(0xa9)](_0x16756a(0x90));});a2_0x4b90a1();'use strict';Object[a2_0x877200(0xaa)](exports,a2_0x877200(0x9f),{'value':!![]}),exports[a2_0x877200(0xb2)]=exports['RuleType']=void 0x0;const joi=require(a2_0x877200(0xb1)),date_1=require('@joi/date'),core_1=require(a2_0x877200(0x92)),interface_1=require(a2_0x877200(0xa4));exports[a2_0x877200(0xb0)]=joi[a2_0x877200(0x9a)](date_1[a2_0x877200(0xaf)]);function a2_0x460b(){const _0x21e204=['extend','map','2bfeqIM','1964824liFCXd','meta','__esModule','toString','8240166vlUuqV','8TsYvLU','Array','../interface','162tMASxM','name','isSchema','getClassMetadata','search','defineProperty','306355ucPrvC','description','constructor','RULES_KEY','default','RuleType','joi','Rule','attachClassMetadata','array','3394924bVnoDm','function','(((.+)+)+)+$','5zPIypc','@midwayjs/core','5519112ORCXFr','label','9463370LHpsJE','5383944bRMUpv','saveClassMetadata','77nBMbov','items'];a2_0x460b=function(){return _0x21e204;};return a2_0x460b();}function a2_0x31ee(_0x7bb67f,_0x33feb6){const _0x5f01c2=a2_0x460b();return a2_0x31ee=function(_0x4b90a1,_0x318f8c){_0x4b90a1=_0x4b90a1-0x90;let _0x460b0f=_0x5f01c2[_0x4b90a1];return _0x460b0f;},a2_0x31ee(_0x7bb67f,_0x33feb6);}function Rule(_0x59583b,_0x28373a,_0x55a006=''){return(_0x3e84f7,_0x26f92f)=>{const _0x19d1e3=a2_0x31ee;var _0xee9238;if(_0x26f92f)!joi[_0x19d1e3(0xa7)](_0x28373a)&&(_0x28373a===null||_0x28373a===void 0x0?void 0x0:_0x28373a[_0x19d1e3(0xa6)])&&(_0x28373a=joi['object']((0x0,core_1['getClassMetadata'])(interface_1['RULES_KEY'],_0x28373a))[_0x19d1e3(0x9e)]({'id':_0x28373a[_0x19d1e3(0xa6)]}),(0x0,core_1['getPropertyType'])(_0x3e84f7,_0x26f92f)['name']===_0x19d1e3(0xa3)&&(_0x28373a=joi[_0x19d1e3(0xb4)]()[_0x19d1e3(0x99)](_0x28373a))),joi[_0x19d1e3(0xa7)](_0x28373a)&&(_0x59583b&&typeof(_0x28373a===null||_0x28373a===void 0x0?void 0x0:_0x28373a[_0x19d1e3(0x94)])==_0x19d1e3(0xb6)&&(_0x28373a=_0x28373a[_0x19d1e3(0x94)](_0x59583b)),_0x55a006&&typeof(_0x28373a===null||_0x28373a===void 0x0?void 0x0:_0x28373a['description'])==_0x19d1e3(0xb6)&&(_0x28373a=_0x28373a[_0x19d1e3(0xac)](_0x55a006)),(0x0,core_1[_0x19d1e3(0xb3)])(interface_1[_0x19d1e3(0xae)],_0x28373a,_0x3e84f7,_0x26f92f));else{const _0x5d825d=(0x0,core_1[_0x19d1e3(0xa8)])(interface_1['RULES_KEY'],_0x28373a);if(_0x5d825d){let _0xb0721f=(_0xee9238=(0x0,core_1[_0x19d1e3(0xa8)])(interface_1['RULES_KEY'],_0x3e84f7))!==null&&_0xee9238!==void 0x0?_0xee9238:{};Object['keys'](_0x5d825d)[_0x19d1e3(0x9b)](_0x13a867=>{!_0xb0721f[_0x13a867]&&(_0xb0721f[_0x13a867]=_0x5d825d[_0x13a867]);}),(0x0,core_1[_0x19d1e3(0x97)])(interface_1[_0x19d1e3(0xae)],_0xb0721f,_0x3e84f7);}}};}exports[a2_0x877200(0xb2)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x5d46ac=a3_0x4843;(function(_0x14f39c,_0x52e0bc){const _0x129475=a3_0x4843,_0x5475cd=_0x14f39c();while(!![]){try{const _0x38924a=-parseInt(_0x129475(0x1c6))/0x1*(-parseInt(_0x129475(0x1bc))/0x2)+parseInt(_0x129475(0x1cc))/0x3*(-parseInt(_0x129475(0x1c1))/0x4)+-parseInt(_0x129475(0x1b8))/0x5+parseInt(_0x129475(0x1b7))/0x6+-parseInt(_0x129475(0x1c7))/0x7*(parseInt(_0x129475(0x1ca))/0x8)+parseInt(_0x129475(0x1bb))/0x9+parseInt(_0x129475(0x1b9))/0xa;if(_0x38924a===_0x52e0bc)break;else _0x5475cd['push'](_0x5475cd['shift']());}catch(_0x1f7539){_0x5475cd['push'](_0x5475cd['shift']());}}}(a3_0x47a4,0x9f61d));function a3_0x47a4(){const _0x215ab4=['defineProperty','__esModule','Validator','constructor','303152egKDDp','replace','toString','prototype','search','1hDJzmN','7ZNJjvF','VALIDATOR_KEY','(((.+)+)+)+$','7424792GkmTdZ','@midwayjs/core','45Pzkytm','function','getFuncArgs','1744350asbjpC','2486375sDEpLx','10265890RAMdMP','../interface','8055513hVKscr','2005304WmVBEJ'];a3_0x47a4=function(){return _0x215ab4;};return a3_0x47a4();}const a3_0x3c1ca3=(function(){let _0x225a47=!![];return function(_0x1763e2,_0x261b13){const _0x20ee79=_0x225a47?function(){if(_0x261b13){const _0x47c3ee=_0x261b13['apply'](_0x1763e2,arguments);return _0x261b13=null,_0x47c3ee;}}:function(){};return _0x225a47=![],_0x20ee79;};}()),a3_0x31f5d9=a3_0x3c1ca3(this,function(){const _0x23f779=a3_0x4843;return a3_0x31f5d9[_0x23f779(0x1c3)]()[_0x23f779(0x1c5)](_0x23f779(0x1c9))['toString']()[_0x23f779(0x1c0)](a3_0x31f5d9)[_0x23f779(0x1c5)]('(((.+)+)+)+$');});function a3_0x4843(_0x2c74be,_0x4dba34){const _0x32f6df=a3_0x47a4();return a3_0x4843=function(_0x31f5d9,_0x3c1ca3){_0x31f5d9=_0x31f5d9-0x1b6;let _0x47a4c7=_0x32f6df[_0x31f5d9];return _0x47a4c7;},a3_0x4843(_0x2c74be,_0x4dba34);}a3_0x31f5d9();'use strict';Object[a3_0x5d46ac(0x1bd)](exports,a3_0x5d46ac(0x1be),{'value':!![]}),exports[a3_0x5d46ac(0x1b6)]=exports[a3_0x5d46ac(0x1bf)]=void 0x0;const core_1=require(a3_0x5d46ac(0x1cb)),interface_1=require(a3_0x5d46ac(0x1ba));function Validator(_0x14db45={}){return(_0x210f6d,_0x41d24,_0x37f1fc)=>{const _0x44a950=a3_0x4843,_0x4e8df8=getFuncArgs(_0x210f6d[_0x41d24]);(0x0,core_1['attachClassMetadata'])(interface_1[_0x44a950(0x1c8)],{'method':_0x41d24,'methodArgs':_0x4e8df8},_0x210f6d),(0x0,core_1['createCustomMethodDecorator'])(interface_1[_0x44a950(0x1c8)],_0x14db45)(_0x210f6d,_0x41d24,_0x37f1fc);};}exports[a3_0x5d46ac(0x1bf)]=Validator;function getFuncArgs(_0x1253cf){const _0x38c01d=a3_0x5d46ac;if(typeof _0x1253cf==_0x38c01d(0x1cd)){const _0x2ed38f=/=>.*$/mg,_0x1dbf32=/=[^,)]+/mg,_0x1d42aa=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x3f7ee4=(_0x1253cf[_0x38c01d(0x1c4)]?_0x1253cf[_0x38c01d(0x1c4)][_0x38c01d(0x1c0)][_0x38c01d(0x1c3)]():_0x1253cf['toString']())['replace'](_0x1d42aa,'')['replace'](_0x2ed38f,'')[_0x38c01d(0x1c2)](_0x1dbf32,''),_0x112fa2=_0x3f7ee4['slice'](_0x3f7ee4['indexOf']('(')+0x1,_0x3f7ee4['indexOf'](')'))['match'](/([^\s,]+)/g)||[];return _0x112fa2;}}exports[a3_0x5d46ac(0x1b6)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x5297e2=a4_0x8f72;(function(_0x3c2c27,_0x3aa89a){var _0x52e931=a4_0x8f72,_0x417c6=_0x3c2c27();while(!![]){try{var _0x5ae183=-parseInt(_0x52e931(0x71))/0x1+-parseInt(_0x52e931(0x6f))/0x2+parseInt(_0x52e931(0x7e))/0x3*(parseInt(_0x52e931(0x69))/0x4)+parseInt(_0x52e931(0x82))/0x5+parseInt(_0x52e931(0x70))/0x6*(-parseInt(_0x52e931(0x6e))/0x7)+parseInt(_0x52e931(0x6b))/0x8*(parseInt(_0x52e931(0x80))/0x9)+-parseInt(_0x52e931(0x72))/0xa*(-parseInt(_0x52e931(0x68))/0xb);if(_0x5ae183===_0x3aa89a)break;else _0x417c6['push'](_0x417c6['shift']());}catch(_0x284961){_0x417c6['push'](_0x417c6['shift']());}}}(a4_0x5748,0x9bfcc));function a4_0x8f72(_0x2b81b0,_0xcbf4a1){var _0x3d53d1=a4_0x5748();return a4_0x8f72=function(_0x4e2ef8,_0x277f4b){_0x4e2ef8=_0x4e2ef8-0x68;var _0x5748c8=_0x3d53d1[_0x4e2ef8];return _0x5748c8;},a4_0x8f72(_0x2b81b0,_0xcbf4a1);}var a4_0x277f4b=(function(){var _0x537088=!![];return function(_0x21249f,_0x4403fa){var _0x718c=_0x537088?function(){var _0x541eb9=a4_0x8f72;if(_0x4403fa){var _0x1635a4=_0x4403fa[_0x541eb9(0x7c)](_0x21249f,arguments);return _0x4403fa=null,_0x1635a4;}}:function(){};return _0x537088=![],_0x718c;};}()),a4_0x4e2ef8=a4_0x277f4b(this,function(){var _0x27ab9a=a4_0x8f72;return a4_0x4e2ef8[_0x27ab9a(0x7f)]()[_0x27ab9a(0x75)]('(((.+)+)+)+$')[_0x27ab9a(0x7f)]()['constructor'](a4_0x4e2ef8)[_0x27ab9a(0x75)](_0x27ab9a(0x7d));});a4_0x4e2ef8();'use strict';var __decorate=this&&this['__decorate']||function(_0x5026ac,_0x3d7830,_0x4b2c1f,_0xdc3672){var _0x1715cc=a4_0x8f72,_0x13f227=arguments[_0x1715cc(0x7a)],_0x5ce0a1=_0x13f227<0x3?_0x3d7830:_0xdc3672===null?_0xdc3672=Object['getOwnPropertyDescriptor'](_0x3d7830,_0x4b2c1f):_0xdc3672,_0x568b8b;if(typeof Reflect===_0x1715cc(0x6c)&&typeof Reflect[_0x1715cc(0x73)]===_0x1715cc(0x79))_0x5ce0a1=Reflect[_0x1715cc(0x73)](_0x5026ac,_0x3d7830,_0x4b2c1f,_0xdc3672);else{for(var _0x5afa26=_0x5026ac[_0x1715cc(0x7a)]-0x1;_0x5afa26>=0x0;_0x5afa26--)if(_0x568b8b=_0x5026ac[_0x5afa26])_0x5ce0a1=(_0x13f227<0x3?_0x568b8b(_0x5ce0a1):_0x13f227>0x3?_0x568b8b(_0x3d7830,_0x4b2c1f,_0x5ce0a1):_0x568b8b(_0x3d7830,_0x4b2c1f))||_0x5ce0a1;}return _0x13f227>0x3&&_0x5ce0a1&&Object['defineProperty'](_0x3d7830,_0x4b2c1f,_0x5ce0a1),_0x5ce0a1;},__metadata=this&&this['__metadata']||function(_0x21788a,_0x4df291){var _0x17ec00=a4_0x8f72;if(typeof Reflect===_0x17ec00(0x6c)&&typeof Reflect[_0x17ec00(0x76)]==='function')return Reflect['metadata'](_0x21788a,_0x4df291);};Object['defineProperty'](exports,a4_0x5297e2(0x81),{'value':!![]}),exports[a4_0x5297e2(0x6d)]=void 0x0;function a4_0x5748(){var _0x33d3a5=['decorate','design:type','search','metadata','PARAMS','NOFIND_SCHEMA','function','length','参数验证失败','apply','(((.+)+)+)+$','3nquORJ','toString','2824047ZBZvFA','__esModule','2335150Syihkg','3641JCanNE','2880392WyjPxZ','AnnErrorMsg','8aehVdq','object','ValidatorError','13391Ljmckt','711174uXOQvy','978YkyqAj','1236238sYXJlZ','31470HPAfBU'];a4_0x5748=function(){return _0x33d3a5;};return a4_0x5748();}const core_1=require('@anncic-api/core');class ValidatorError extends AnnError{}exports[a4_0x5297e2(0x6d)]=ValidatorError,ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x5297e2(0x78)]=0x18c1c,__decorate([(0x0,core_1[a4_0x5297e2(0x6a)])(a4_0x5297e2(0x7b)),__metadata(a4_0x5297e2(0x74),Object)],ValidatorError,a4_0x5297e2(0x77),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])('参数验证失败'),__metadata(a4_0x5297e2(0x74),Object)],ValidatorError,a4_0x5297e2(0x78),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x30d3cf=a5_0x2258;(function(_0x49dff0,_0x49b697){const _0x5ba57f=a5_0x2258,_0x191d76=_0x49dff0();while(!![]){try{const _0x12f7fe=-parseInt(_0x5ba57f(0x199))/0x1+parseInt(_0x5ba57f(0x183))/0x2+parseInt(_0x5ba57f(0x18c))/0x3+-parseInt(_0x5ba57f(0x18f))/0x4*(-parseInt(_0x5ba57f(0x18e))/0x5)+parseInt(_0x5ba57f(0x192))/0x6+-parseInt(_0x5ba57f(0x190))/0x7+parseInt(_0x5ba57f(0x18a))/0x8*(-parseInt(_0x5ba57f(0x18d))/0x9);if(_0x12f7fe===_0x49b697)break;else _0x191d76['push'](_0x191d76['shift']());}catch(_0x2052fc){_0x191d76['push'](_0x191d76['shift']());}}}(a5_0x13d2,0xb5269));const a5_0x216341=(function(){let _0x248ea5=!![];return function(_0x3b5f85,_0x1826d9){const _0x5e6e8b=_0x248ea5?function(){const _0x5a30c8=a5_0x2258;if(_0x1826d9){const _0xa87e0e=_0x1826d9[_0x5a30c8(0x182)](_0x3b5f85,arguments);return _0x1826d9=null,_0xa87e0e;}}:function(){};return _0x248ea5=![],_0x5e6e8b;};}()),a5_0x5c92c4=a5_0x216341(this,function(){const _0x8391a2=a5_0x2258;return a5_0x5c92c4[_0x8391a2(0x187)]()[_0x8391a2(0x198)](_0x8391a2(0x18b))[_0x8391a2(0x187)]()['constructor'](a5_0x5c92c4)[_0x8391a2(0x198)](_0x8391a2(0x18b));});a5_0x5c92c4();'use strict';Object[a5_0x30d3cf(0x196)](exports,a5_0x30d3cf(0x191),{'value':!![]}),exports[a5_0x30d3cf(0x186)]=exports['PickDto']=void 0x0;const core_1=require(a5_0x30d3cf(0x193)),interface_1=require(a5_0x30d3cf(0x185));function PickDto(_0x2312d5,_0x59bae9){const _0x13038d=a5_0x30d3cf,_0xfbdc18=function(){};_0xfbdc18[_0x13038d(0x195)]=_0x2312d5[_0x13038d(0x195)];const _0x382098=(0x0,core_1[_0x13038d(0x184)])(interface_1[_0x13038d(0x197)],_0x2312d5),_0x569435={};for(const _0x64691c of _0x59bae9){_0x382098[_0x64691c]&&(_0x569435[_0x64691c]=_0x382098[_0x64691c]);}return(0x0,core_1[_0x13038d(0x188)])(interface_1[_0x13038d(0x197)],_0x569435,_0xfbdc18),_0xfbdc18;}exports[a5_0x30d3cf(0x189)]=PickDto;function OmitDto(_0x31599c,_0x2053c8){const _0x545cb1=a5_0x30d3cf,_0x37afd8=function(){};_0x37afd8['prototype']=_0x31599c[_0x545cb1(0x195)];const _0x3380e5=(0x0,core_1[_0x545cb1(0x184)])(interface_1['RULES_KEY'],_0x31599c),_0x31f5a4=Object[_0x545cb1(0x194)]({},_0x3380e5);for(const _0x26b5e0 of _0x2053c8){delete _0x31f5a4[_0x26b5e0];}return(0x0,core_1[_0x545cb1(0x188)])(interface_1['RULES_KEY'],_0x31f5a4,_0x37afd8),_0x37afd8;}exports[a5_0x30d3cf(0x186)]=OmitDto;function a5_0x2258(_0x11c4b6,_0x4d72cc){const _0x2e3dc7=a5_0x13d2();return a5_0x2258=function(_0x5c92c4,_0x216341){_0x5c92c4=_0x5c92c4-0x182;let _0x13d29a=_0x2e3dc7[_0x5c92c4];return _0x13d29a;},a5_0x2258(_0x11c4b6,_0x4d72cc);}function a5_0x13d2(){const _0x2317ad=['search','15629cWlYKa','apply','2467618cspapu','getClassExtendedMetadata','../interface','OmitDto','toString','saveClassMetadata','PickDto','8qhjgKE','(((.+)+)+)+$','4210119grHEmv','20556162atDbPW','6863405nxUqvs','4dXrhwV','6791596MyzsSK','__esModule','12030bmxxjj','@midwayjs/core','assign','prototype','defineProperty','RULES_KEY'];a5_0x13d2=function(){return _0x2317ad;};return a5_0x13d2();}
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x25fb93=a6_0x4d34;(function(_0x1ecd75,_0x5a34e6){const _0x5e9eca=a6_0x4d34,_0x314367=_0x1ecd75();while(!![]){try{const _0x22480a=-parseInt(_0x5e9eca(0xc6))/0x1+parseInt(_0x5e9eca(0xcb))/0x2+-parseInt(_0x5e9eca(0xd1))/0x3+parseInt(_0x5e9eca(0xc5))/0x4+-parseInt(_0x5e9eca(0xcf))/0x5*(parseInt(_0x5e9eca(0xcd))/0x6)+-parseInt(_0x5e9eca(0xd5))/0x7*(-parseInt(_0x5e9eca(0xda))/0x8)+parseInt(_0x5e9eca(0xd2))/0x9*(parseInt(_0x5e9eca(0xd8))/0xa);if(_0x22480a===_0x5a34e6)break;else _0x314367['push'](_0x314367['shift']());}catch(_0xaf267b){_0x314367['push'](_0x314367['shift']());}}}(a6_0x2c62,0x4b6e1));function a6_0x4d34(_0x1f7ae6,_0x273121){const _0x4c5d82=a6_0x2c62();return a6_0x4d34=function(_0x547027,_0x5d5fa5){_0x547027=_0x547027-0xc5;let _0x2c6207=_0x4c5d82[_0x547027];return _0x2c6207;},a6_0x4d34(_0x1f7ae6,_0x273121);}const a6_0x5d5fa5=(function(){let _0x45f53d=!![];return function(_0x125920,_0x37d05b){const _0x355076=_0x45f53d?function(){const _0x3ee785=a6_0x4d34;if(_0x37d05b){const _0x19c3aa=_0x37d05b[_0x3ee785(0xc7)](_0x125920,arguments);return _0x37d05b=null,_0x19c3aa;}}:function(){};return _0x45f53d=![],_0x355076;};}()),a6_0x547027=a6_0x5d5fa5(this,function(){const _0x26b2d2=a6_0x4d34;return a6_0x547027[_0x26b2d2(0xd9)]()[_0x26b2d2(0xcc)](_0x26b2d2(0xc8))[_0x26b2d2(0xd9)]()[_0x26b2d2(0xca)](a6_0x547027)[_0x26b2d2(0xcc)]('(((.+)+)+)+$');});function a6_0x2c62(){const _0x4df58e=['constructor','1233772LcHMOf','search','1331916vQiJKE','../interface','10sTHVxk','RULES_KEY','87681IeNpWj','1518390zKXNQY','object','getSchema','7pyUIce','getClassExtendedMetadata','joi','10YfEGmv','toString','147032gfLVEx','1807076MvbjHm','473584qKugcq','apply','(((.+)+)+)+$','__esModule'];a6_0x2c62=function(){return _0x4df58e;};return a6_0x2c62();}a6_0x547027();'use strict';Object['defineProperty'](exports,a6_0x25fb93(0xc9),{'value':!![]}),exports[a6_0x25fb93(0xd4)]=void 0x0;const Joi=require(a6_0x25fb93(0xd7)),core_1=require('@midwayjs/core'),interface_1=require(a6_0x25fb93(0xce));function getSchema(_0x2de40b){const _0x470c17=a6_0x25fb93,_0x3777ff=(0x0,core_1[_0x470c17(0xd6)])(interface_1[_0x470c17(0xd0)],_0x2de40b);if(_0x3777ff)return Joi[_0x470c17(0xd3)](_0x3777ff);}exports[a6_0x25fb93(0xd4)]=getSchema;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x588cca=a7_0x280a;(function(_0x2ac556,_0x37e839){var _0xda47ce=a7_0x280a,_0xa8765d=_0x2ac556();while(!![]){try{var _0x15c411=parseInt(_0xda47ce(0x1e1))/0x1+-parseInt(_0xda47ce(0x1cc))/0x2+parseInt(_0xda47ce(0x1d8))/0x3+parseInt(_0xda47ce(0x1e8))/0x4*(-parseInt(_0xda47ce(0x1e7))/0x5)+-parseInt(_0xda47ce(0x1de))/0x6*(-parseInt(_0xda47ce(0x1cd))/0x7)+-parseInt(_0xda47ce(0x1d7))/0x8+parseInt(_0xda47ce(0x1d3))/0x9;if(_0x15c411===_0x37e839)break;else _0xa8765d['push'](_0xa8765d['shift']());}catch(_0xd4da97){_0xa8765d['push'](_0xa8765d['shift']());}}}(a7_0x1a7d,0x43e73));var a7_0x5a4d5f=(function(){var _0x4b5b4f=!![];return function(_0x4d6092,_0x4aa775){var _0x1ff6dd=_0x4b5b4f?function(){var _0x338a8a=a7_0x280a;if(_0x4aa775){var _0x2d3db4=_0x4aa775[_0x338a8a(0x1df)](_0x4d6092,arguments);return _0x4aa775=null,_0x2d3db4;}}:function(){};return _0x4b5b4f=![],_0x1ff6dd;};}()),a7_0x3a76ca=a7_0x5a4d5f(this,function(){var _0x515f88=a7_0x280a;return a7_0x3a76ca['toString']()['search'](_0x515f88(0x1d9))['toString']()['constructor'](a7_0x3a76ca)[_0x515f88(0x1d5)](_0x515f88(0x1d9));});a7_0x3a76ca();'use strict';var __createBinding=this&&this['__createBinding']||(Object[a7_0x588cca(0x1e5)]?function(_0x2ebe42,_0x19e20d,_0x36386a,_0x23f77c){var _0x4ce51c=a7_0x588cca;if(_0x23f77c===undefined)_0x23f77c=_0x36386a;var _0x3998bb=Object[_0x4ce51c(0x1dd)](_0x19e20d,_0x36386a);(!_0x3998bb||(_0x4ce51c(0x1da)in _0x3998bb?!_0x19e20d[_0x4ce51c(0x1dc)]:_0x3998bb['writable']||_0x3998bb[_0x4ce51c(0x1d1)]))&&(_0x3998bb={'enumerable':!![],'get':function(){return _0x19e20d[_0x36386a];}}),Object[_0x4ce51c(0x1e4)](_0x2ebe42,_0x23f77c,_0x3998bb);}:function(_0x39ec19,_0x1192bc,_0xf0adae,_0xd7e13f){if(_0xd7e13f===undefined)_0xd7e13f=_0xf0adae;_0x39ec19[_0xd7e13f]=_0x1192bc[_0xf0adae];}),__exportStar=this&&this['__exportStar']||function(_0x582477,_0x2cb758){var _0x22dedd=a7_0x588cca;for(var _0x1968d1 in _0x582477)if(_0x1968d1!==_0x22dedd(0x1e0)&&!Object[_0x22dedd(0x1ce)]['hasOwnProperty']['call'](_0x2cb758,_0x1968d1))__createBinding(_0x2cb758,_0x582477,_0x1968d1);};Object[a7_0x588cca(0x1e4)](exports,a7_0x588cca(0x1dc),{'value':!![]}),exports['Configuration']=exports[a7_0x588cca(0x1e6)]=exports[a7_0x588cca(0x1d0)]=exports[a7_0x588cca(0x1e3)]=exports[a7_0x588cca(0x1db)]=exports[a7_0x588cca(0x1cf)]=void 0x0,__exportStar(require('./interface'),exports),__exportStar(require('./helper/dtoHelper'),exports),__exportStar(require(a7_0x588cca(0x1ca)),exports);var Validator_1=require(a7_0x588cca(0x1e2));Object[a7_0x588cca(0x1e4)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x351727=a7_0x588cca;return Validator_1[_0x351727(0x1cf)];}});var Rule_1=require(a7_0x588cca(0x1d6));Object[a7_0x588cca(0x1e4)](exports,a7_0x588cca(0x1db),{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object[a7_0x588cca(0x1e4)](exports,a7_0x588cca(0x1e3),{'enumerable':!![],'get':function(){var _0x398a56=a7_0x588cca;return Rule_1[_0x398a56(0x1e3)];}});function a7_0x1a7d(){var _0x2f5472=['Rule','__esModule','getOwnPropertyDescriptor','2372958UbWSDm','apply','default','167298PKETJp','./decorator/Validator','RuleType','defineProperty','create','ValidatorService','590075IDIiIg','4AkYjJp','./helper/getSchema','./configuration','793654xfsuuc','7NFBAVX','prototype','Validator','ValidatorError','configurable','Configuration','4269654KBoZBI','./service/ValidatorService','search','./decorator/Rule','4097704ejWOpX','803967XptJOc','(((.+)+)+)+$','get'];a7_0x1a7d=function(){return _0x2f5472;};return a7_0x1a7d();}var ValidatorError_1=require('./exception/ValidatorError');Object[a7_0x588cca(0x1e4)](exports,a7_0x588cca(0x1d0),{'enumerable':!![],'get':function(){var _0x377ed8=a7_0x588cca;return ValidatorError_1[_0x377ed8(0x1d0)];}});var ValidatorService_1=require(a7_0x588cca(0x1d4));Object[a7_0x588cca(0x1e4)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x587139=a7_0x588cca;return ValidatorService_1[_0x587139(0x1e6)];}});var configuration_1=require(a7_0x588cca(0x1cb));function a7_0x280a(_0x5428dc,_0x2ce64f){var _0x28760c=a7_0x1a7d();return a7_0x280a=function(_0x3a76ca,_0x5a4d5f){_0x3a76ca=_0x3a76ca-0x1ca;var _0x1a7d98=_0x28760c[_0x3a76ca];return _0x1a7d98;},a7_0x280a(_0x5428dc,_0x2ce64f);}Object['defineProperty'](exports,a7_0x588cca(0x1d2),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x28588f=a8_0x5573;function a8_0x5053(){var _0x1dcf7b=['VALIDATOR_KEY','10DywUEe','1098945ZxfMyO','6ajyQyv','anncic-api:validator:validator','21693199wyNDIb','1674702wvtEer','__esModule','9909656QWbLbp','115UhWqGe','(((.+)+)+)+$','RULES_KEY','anncic-api:validator:rules','6QfrRiu','145004agYPRh','106879BauyBg','4238605MNvgzn','constructor','toString','search'];a8_0x5053=function(){return _0x1dcf7b;};return a8_0x5053();}(function(_0x4a034c,_0x4da77c){var _0x14e83d=a8_0x5573,_0x139b6a=_0x4a034c();while(!![]){try{var _0x5c78e3=-parseInt(_0x14e83d(0x1af))/0x1*(parseInt(_0x14e83d(0x1b7))/0x2)+parseInt(_0x14e83d(0x1ba))/0x3+parseInt(_0x14e83d(0x1ae))/0x4*(-parseInt(_0x14e83d(0x1bd))/0x5)+-parseInt(_0x14e83d(0x1ad))/0x6*(-parseInt(_0x14e83d(0x1b0))/0x7)+-parseInt(_0x14e83d(0x1bc))/0x8+-parseInt(_0x14e83d(0x1b6))/0x9+-parseInt(_0x14e83d(0x1b5))/0xa*(-parseInt(_0x14e83d(0x1b9))/0xb);if(_0x5c78e3===_0x4da77c)break;else _0x139b6a['push'](_0x139b6a['shift']());}catch(_0x593a89){_0x139b6a['push'](_0x139b6a['shift']());}}}(a8_0x5053,0x9785c));var a8_0xf3ba7d=(function(){var _0x377ce0=!![];return function(_0x3bd7c2,_0x42cba9){var _0x42bd16=_0x377ce0?function(){if(_0x42cba9){var _0x29fcd3=_0x42cba9['apply'](_0x3bd7c2,arguments);return _0x42cba9=null,_0x29fcd3;}}:function(){};return _0x377ce0=![],_0x42bd16;};}()),a8_0x170299=a8_0xf3ba7d(this,function(){var _0x1cb646=a8_0x5573;return a8_0x170299[_0x1cb646(0x1b2)]()['search'](_0x1cb646(0x1be))[_0x1cb646(0x1b2)]()[_0x1cb646(0x1b1)](a8_0x170299)[_0x1cb646(0x1b3)](_0x1cb646(0x1be));});a8_0x170299();function a8_0x5573(_0x514387,_0x3a7789){var _0x39573a=a8_0x5053();return a8_0x5573=function(_0x170299,_0xf3ba7d){_0x170299=_0x170299-0x1ad;var _0x5053c5=_0x39573a[_0x170299];return _0x5053c5;},a8_0x5573(_0x514387,_0x3a7789);}'use strict';Object['defineProperty'](exports,a8_0x28588f(0x1bb),{'value':!![]}),exports[a8_0x28588f(0x1b4)]=exports['RULES_KEY']=void 0x0,exports[a8_0x28588f(0x1bf)]=a8_0x28588f(0x1c0),exports[a8_0x28588f(0x1b4)]=a8_0x28588f(0x1b8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a9_0x13f1(){const _0x195c1f=['60SwVMmA','157480TBIgge','keys','__decorate','design:paramtypes','446015bYJYFf','PARAMS','language','540HsXskT','fromEntries','__metadata','messages','key','Provide','1533339YifwSt','design:returntype','forEach','format','getSchema','validatorConfig','i18nConfig','constructor','init','(((.+)+)+)+$','validationOptions','Config','NOFIND_SCHEMA','12MWYVOL','ValidatorService','function','apply','decorate','../exception/ValidatorError','../interface','length','getLocaleMapping','localeTable','5319kkkVxO','object','$_terms','errors','参数验证失败','validator','defineProperty','1841580OIGhzK','Inject','type','ValidatorError','schema','formatLocale','search','metadata','getOwnPropertyDescriptor','RULES_KEY','1263735DULYzu','ScopeEnum','error','Scope','98ElOJvC','YYYY-MM-DD\x20HH:mm:ss','prototype','isSchema','date','defaultLocale','MidwayI18nServiceSingleton','2370fkJEfg','message','value','i18nService','@midwayjs/core','design:type','assign'];a9_0x13f1=function(){return _0x195c1f;};return a9_0x13f1();}const a9_0x3ca459=a9_0x11fb;(function(_0x2795ba,_0x45ec59){const _0x1337f9=a9_0x11fb,_0x3db144=_0x2795ba();while(!![]){try{const _0x11646a=parseInt(_0x1337f9(0xa9))/0x1*(parseInt(_0x1337f9(0xb0))/0x2)+parseInt(_0x1337f9(0x8d))/0x3*(-parseInt(_0x1337f9(0xb8))/0x4)+parseInt(_0x1337f9(0xb5))/0x5*(parseInt(_0x1337f9(0x83))/0x6)+parseInt(_0x1337f9(0xa2))/0x7*(parseInt(_0x1337f9(0xb1))/0x8)+parseInt(_0x1337f9(0xbe))/0x9+-parseInt(_0x1337f9(0x94))/0xa+-parseInt(_0x1337f9(0x9e))/0xb;if(_0x11646a===_0x45ec59)break;else _0x3db144['push'](_0x3db144['shift']());}catch(_0x88383a){_0x3db144['push'](_0x3db144['shift']());}}}(a9_0x13f1,0x2658d));const a9_0x25a996=(function(){let _0x31cc78=!![];return function(_0x13b8d6,_0x563474){const _0x33aec5=_0x31cc78?function(){const _0x32851f=a9_0x11fb;if(_0x563474){const _0x8740a3=_0x563474[_0x32851f(0x86)](_0x13b8d6,arguments);return _0x563474=null,_0x8740a3;}}:function(){};return _0x31cc78=![],_0x33aec5;};}()),a9_0x36dd27=a9_0x25a996(this,function(){const _0x541a69=a9_0x11fb;return a9_0x36dd27['toString']()['search'](_0x541a69(0xc7))['toString']()[_0x541a69(0xc5)](a9_0x36dd27)[_0x541a69(0x9a)](_0x541a69(0xc7));});a9_0x36dd27();'use strict';var __decorate=this&&this[a9_0x3ca459(0xb3)]||function(_0x363c3f,_0x4cce33,_0x29fe30,_0x1f73fd){const _0x48fb90=a9_0x3ca459;var _0x40eeea=arguments[_0x48fb90(0x8a)],_0x129579=_0x40eeea<0x3?_0x4cce33:_0x1f73fd===null?_0x1f73fd=Object[_0x48fb90(0x9c)](_0x4cce33,_0x29fe30):_0x1f73fd,_0x5eed9a;if(typeof Reflect===_0x48fb90(0x8e)&&typeof Reflect[_0x48fb90(0x87)]===_0x48fb90(0x85))_0x129579=Reflect[_0x48fb90(0x87)](_0x363c3f,_0x4cce33,_0x29fe30,_0x1f73fd);else{for(var _0x58cf94=_0x363c3f[_0x48fb90(0x8a)]-0x1;_0x58cf94>=0x0;_0x58cf94--)if(_0x5eed9a=_0x363c3f[_0x58cf94])_0x129579=(_0x40eeea<0x3?_0x5eed9a(_0x129579):_0x40eeea>0x3?_0x5eed9a(_0x4cce33,_0x29fe30,_0x129579):_0x5eed9a(_0x4cce33,_0x29fe30))||_0x129579;}return _0x40eeea>0x3&&_0x129579&&Object[_0x48fb90(0x93)](_0x4cce33,_0x29fe30,_0x129579),_0x129579;},__metadata=this&&this[a9_0x3ca459(0xba)]||function(_0x31c7b1,_0x47a039){const _0x102fa1=a9_0x3ca459;if(typeof Reflect===_0x102fa1(0x8e)&&typeof Reflect[_0x102fa1(0x9b)]===_0x102fa1(0x85))return Reflect[_0x102fa1(0x9b)](_0x31c7b1,_0x47a039);};Object[a9_0x3ca459(0x93)](exports,'__esModule',{'value':!![]}),exports[a9_0x3ca459(0x84)]=void 0x0;const Joi=require('joi'),i18n_1=require('@midwayjs/i18n'),core_1=require(a9_0x3ca459(0xad)),interface_1=require(a9_0x3ca459(0x89)),ValidatorError_1=require(a9_0x3ca459(0x88));let ValidatorService=exports['ValidatorService']=class ValidatorService{constructor(){const _0x45a71a=a9_0x3ca459;this[_0x45a71a(0xbb)]={};}async[a9_0x3ca459(0xc6)](){const _0x559ff7=a9_0x3ca459,_0x11f133=Object[_0x559ff7(0xb2)](this[_0x559ff7(0xc4)][_0x559ff7(0x8c)]);_0x11f133[_0x559ff7(0xc0)](_0x4260d7=>{const _0x4b66bc=_0x559ff7;this[_0x4b66bc(0xbb)][(0x0,i18n_1[_0x4b66bc(0x99)])(_0x4260d7)]=Object[_0x4b66bc(0xb9)](this['i18nService'][_0x4b66bc(0x8b)](_0x4260d7,_0x4b66bc(0x92)));});}['getSchema'](_0x57180a){const _0x549eff=a9_0x3ca459,_0x2baf94=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x549eff(0x9d)],_0x57180a);return _0x2baf94?Joi[_0x549eff(0x8e)](_0x2baf94):undefined;}[a9_0x3ca459(0x92)](_0x5b5e67,_0x6637b2,_0xbb6de0={}){const _0x54393b=a9_0x3ca459;var _0x3f6a8d,_0x476d19,_0x484b55,_0x2b901f,_0x29bfdb,_0x476301;const _0x3206f5=Joi[_0x54393b(0xa5)](_0x5b5e67)?_0x5b5e67:this[_0x54393b(0xc2)](_0x5b5e67);if(!_0x3206f5)throw new AnnError(ValidatorError_1[_0x54393b(0x97)][_0x54393b(0xca)]);_0xbb6de0[_0x54393b(0xc8)]=Object[_0x54393b(0xaf)]((_0x3f6a8d=this[_0x54393b(0xc3)][_0x54393b(0xc8)])!==null&&_0x3f6a8d!==void 0x0?_0x3f6a8d:{},{'messages':this['messages']},_0xbb6de0[_0x54393b(0xc8)]||{}),_0xbb6de0[_0x54393b(0xc8)][_0x54393b(0x90)]=_0xbb6de0[_0x54393b(0xc8)][_0x54393b(0x90)]||{},_0xbb6de0[_0x54393b(0xc8)]['errors'][_0x54393b(0xb7)]=(0x0,i18n_1['formatLocale'])(this[_0x54393b(0xac)]['getAvailableLocale'](_0xbb6de0['validationOptions'][_0x54393b(0x90)][_0x54393b(0xb7)]||_0xbb6de0['locale']||this[_0x54393b(0xc4)][_0x54393b(0xa7)],'validator'));const _0xe36b63=_0x3206f5['validate'](_0x6637b2,_0xbb6de0[_0x54393b(0xc8)]);if(_0xe36b63===null||_0xe36b63===void 0x0?void 0x0:_0xe36b63[_0x54393b(0xa0)]){if(_0xe36b63[_0x54393b(0xa0)]instanceof AnnError)throw _0xe36b63['error'];else{if(_0xe36b63[_0x54393b(0xa0)]instanceof Error)throw new AnnError(ValidatorError_1[_0x54393b(0x97)][_0x54393b(0xb6)],{'message':((_0x476d19=_0xe36b63[_0x54393b(0xa0)])===null||_0x476d19===void 0x0?void 0x0:_0x476d19[_0x54393b(0xaa)])||_0x54393b(0x91)});else throw new AnnError(ValidatorError_1[_0x54393b(0x97)]['PARAMS'],{'message':((_0x29bfdb=(_0x2b901f=(_0x484b55=_0xe36b63[_0x54393b(0xa0)])===null||_0x484b55===void 0x0?void 0x0:_0x484b55['details'])===null||_0x2b901f===void 0x0?void 0x0:_0x2b901f[0x0])===null||_0x29bfdb===void 0x0?void 0x0:_0x29bfdb['message'])||_0x54393b(0x91)});}}if(_0xe36b63===null||_0xe36b63===void 0x0?void 0x0:_0xe36b63[_0x54393b(0xab)]){const _0x20006b=(_0x476301=_0x3206f5===null||_0x3206f5===void 0x0?void 0x0:_0x3206f5[_0x54393b(0x8f)])===null||_0x476301===void 0x0?void 0x0:_0x476301[_0x54393b(0xb2)],_0x2cd0aa=function(_0x5688cf,_0x917980){const _0x15d6f1=_0x54393b;var _0x5dff65,_0x519107,_0x3b7af2,_0x34a732,_0x31dcf1,_0x2319ed,_0x3854d9,_0x4591e1,_0x5c09d8,_0x4284e2,_0x4958fa;for(let _0x6ffae6 in _0x5688cf){if(_0x917980[(_0x5dff65=_0x5688cf[_0x6ffae6])===null||_0x5dff65===void 0x0?void 0x0:_0x5dff65[_0x15d6f1(0xbc)]]&&((_0x3b7af2=(_0x519107=_0x5688cf[_0x6ffae6])===null||_0x519107===void 0x0?void 0x0:_0x519107[_0x15d6f1(0x98)])===null||_0x3b7af2===void 0x0?void 0x0:_0x3b7af2[_0x15d6f1(0x96)])){if(((_0x31dcf1=(_0x34a732=_0x5688cf[_0x6ffae6])===null||_0x34a732===void 0x0?void 0x0:_0x34a732[_0x15d6f1(0x98)])===null||_0x31dcf1===void 0x0?void 0x0:_0x31dcf1[_0x15d6f1(0x96)])=='object')_0x917980[_0x5688cf[_0x6ffae6][_0x15d6f1(0xbc)]]=_0x2cd0aa((_0x3854d9=(_0x2319ed=_0x5688cf[_0x6ffae6])===null||_0x2319ed===void 0x0?void 0x0:_0x2319ed[_0x15d6f1(0x98)][_0x15d6f1(0x8f)])===null||_0x3854d9===void 0x0?void 0x0:_0x3854d9[_0x15d6f1(0xb2)],_0x917980[_0x5688cf[_0x6ffae6][_0x15d6f1(0xbc)]]);else{if(_0x5688cf[_0x6ffae6]['schema']['type']==_0x15d6f1(0xa6)&&_0xe36b63[_0x15d6f1(0xab)][(_0x4591e1=_0x5688cf[_0x6ffae6])===null||_0x4591e1===void 0x0?void 0x0:_0x4591e1['key']]){const _0x5e685e=((_0x4958fa=(_0x4284e2=(_0x5c09d8=_0x5688cf[_0x6ffae6])===null||_0x5c09d8===void 0x0?void 0x0:_0x5c09d8[_0x15d6f1(0x98)])===null||_0x4284e2===void 0x0?void 0x0:_0x4284e2['_flags'])===null||_0x4958fa===void 0x0?void 0x0:_0x4958fa[_0x15d6f1(0xc1)])||_0x15d6f1(0xa3);_0x917980[_0x5688cf[_0x6ffae6][_0x15d6f1(0xbc)]]=dayjs(_0xe36b63[_0x15d6f1(0xab)][_0x5688cf[_0x6ffae6][_0x15d6f1(0xbc)]])[_0x15d6f1(0xc1)](_0x5e685e);}}}}return _0x917980;};return _0x2cd0aa(_0x20006b,_0xe36b63[_0x54393b(0xab)]);}throw new AnnError(ValidatorError_1[_0x54393b(0x97)][_0x54393b(0xb6)]);}};function a9_0x11fb(_0x58a649,_0x8f158a){const _0x5d32e4=a9_0x13f1();return a9_0x11fb=function(_0x36dd27,_0x25a996){_0x36dd27=_0x36dd27-0x83;let _0x13f1c5=_0x5d32e4[_0x36dd27];return _0x13f1c5;},a9_0x11fb(_0x58a649,_0x8f158a);}__decorate([(0x0,core_1[a9_0x3ca459(0xc9)])('i18n'),__metadata('design:type',Object)],ValidatorService[a9_0x3ca459(0xa4)],a9_0x3ca459(0xc4),void 0x0),__decorate([(0x0,core_1[a9_0x3ca459(0xc9)])(a9_0x3ca459(0x92)),__metadata(a9_0x3ca459(0xae),Object)],ValidatorService['prototype'],a9_0x3ca459(0xc3),void 0x0),__decorate([(0x0,core_1[a9_0x3ca459(0x95)])(),__metadata(a9_0x3ca459(0xae),i18n_1[a9_0x3ca459(0xa8)])],ValidatorService[a9_0x3ca459(0xa4)],'i18nService',void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata('design:type',Function),__metadata(a9_0x3ca459(0xb4),[]),__metadata(a9_0x3ca459(0xbf),Promise)],ValidatorService[a9_0x3ca459(0xa4)],a9_0x3ca459(0xc6),null),exports['ValidatorService']=ValidatorService=__decorate([(0x0,core_1[a9_0x3ca459(0xbd)])(a9_0x3ca459(0x92)),(0x0,core_1[a9_0x3ca459(0xa1)])(core_1[a9_0x3ca459(0x9f)]['Singleton'])],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.4",
|
|
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.4",
|
|
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": "e3c9bceaa94dda3198120765d4c9505e505ba0a3"
|
|
30
30
|
}
|