@anncic-api/validator 3.4.12 → 3.4.16
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_0x180814=a0_0x53a7;(function(_0x311303,_0x3e2f8e){const _0x42b2cb=a0_0x53a7,_0x272952=_0x311303();while(!![]){try{const _0x42c76b=parseInt(_0x42b2cb(0x1c0))/0x1*(-parseInt(_0x42b2cb(0x1ae))/0x2)+parseInt(_0x42b2cb(0x1bf))/0x3*(parseInt(_0x42b2cb(0x1bd))/0x4)+parseInt(_0x42b2cb(0x1ac))/0x5+-parseInt(_0x42b2cb(0x1ad))/0x6*(-parseInt(_0x42b2cb(0x1b8))/0x7)+-parseInt(_0x42b2cb(0x1b7))/0x8*(-parseInt(_0x42b2cb(0x1b4))/0x9)+-parseInt(_0x42b2cb(0x1be))/0xa*(parseInt(_0x42b2cb(0x1b3))/0xb)+parseInt(_0x42b2cb(0x1bc))/0xc;if(_0x42c76b===_0x3e2f8e)break;else _0x272952['push'](_0x272952['shift']());}catch(_0xdf4615){_0x272952['push'](_0x272952['shift']());}}}(a0_0x2ba0,0x36a7c));const a0_0x5f02b1=(function(){let _0x5183a1=!![];return function(_0x1d0689,_0xbc990f){const _0x217a0b=_0x5183a1?function(){const _0x1b4864=a0_0x53a7;if(_0xbc990f){const _0x2adadc=_0xbc990f[_0x1b4864(0x1c1)](_0x1d0689,arguments);return _0xbc990f=null,_0x2adadc;}}:function(){};return _0x5183a1=![],_0x217a0b;};}()),a0_0x5a0930=a0_0x5f02b1(this,function(){const _0x381a39=a0_0x53a7;return a0_0x5a0930[_0x381a39(0x1b0)]()['search'](_0x381a39(0x1b1))[_0x381a39(0x1b0)]()['constructor'](a0_0x5a0930)[_0x381a39(0x1af)](_0x381a39(0x1b1));});a0_0x5a0930();'use strict';function a0_0x53a7(_0x4aab1c,_0x29633b){const _0x3c2b68=a0_0x2ba0();return a0_0x53a7=function(_0x5a0930,_0x5f02b1){_0x5a0930=_0x5a0930-0x1ac;let _0x2ba0ed=_0x3c2b68[_0x5a0930];return _0x2ba0ed;},a0_0x53a7(_0x4aab1c,_0x29633b);}Object['defineProperty'](exports,a0_0x180814(0x1ba),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');function a0_0x2ba0(){const _0x1dd91f=['1018969lCUTAn','default','__esModule','string','1258932FtJaHH','271672BQTTcM','62460yGFYQH','12JhZbGY','2221yxBDrG','apply','1025765fkufqK','6MItNqy','222fVpHpN','search','toString','(((.+)+)+)+$','PARAMS','715yFUkZQ','9eMAIWi','../../locales/zh_CN.json','ValidatorError','1192688LmCSKZ'];a0_0x2ba0=function(){return _0x1dd91f;};return a0_0x2ba0();}exports[a0_0x180814(0x1b9)]={'validator':{'errorStatus':ValidatorError_1[a0_0x180814(0x1b6)][a0_0x180814(0x1b2)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x180814(0x1bb)}},'i18n':{'localeTable':{'en_US':{'validator':require('../../locales/en_US.json')},'zh_CN':{'validator':require(a0_0x180814(0x1b5))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0xd5a01a=a1_0x4c40;(function(_0x44a135,_0x21ea62){const _0x3bf0db=a1_0x4c40,_0x3aa496=_0x44a135();while(!![]){try{const _0x16f3b9=-parseInt(_0x3bf0db(0xa1))/0x1+parseInt(_0x3bf0db(0x8a))/0x2*(-parseInt(_0x3bf0db(0xb6))/0x3)+-parseInt(_0x3bf0db(0x89))/0x4+-parseInt(_0x3bf0db(0xb3))/0x5+-parseInt(_0x3bf0db(0x96))/0x6*(parseInt(_0x3bf0db(0xb5))/0x7)+-parseInt(_0x3bf0db(0xa0))/0x8+-parseInt(_0x3bf0db(0x9f))/0x9*(-parseInt(_0x3bf0db(0x95))/0xa);if(_0x16f3b9===_0x21ea62)break;else _0x3aa496['push'](_0x3aa496['shift']());}catch(_0x380f7f){_0x3aa496['push'](_0x3aa496['shift']());}}}(a1_0x4033,0x5c906));const a1_0xa32e07=(function(){let _0x3c2581=!![];return function(_0x26f98c,_0x15beec){const _0x4b6bd3=_0x3c2581?function(){const _0x5c8291=a1_0x4c40;if(_0x15beec){const _0x180d85=_0x15beec[_0x5c8291(0x92)](_0x26f98c,arguments);return _0x15beec=null,_0x180d85;}}:function(){};return _0x3c2581=![],_0x4b6bd3;};}()),a1_0x2141e7=a1_0xa32e07(this,function(){const _0x5ebb0e=a1_0x4c40;return a1_0x2141e7['toString']()[_0x5ebb0e(0xb2)]('(((.+)+)+)+$')[_0x5ebb0e(0x91)]()['constructor'](a1_0x2141e7)[_0x5ebb0e(0xb2)](_0x5ebb0e(0xba));});a1_0x2141e7();'use strict';function a1_0x4033(){const _0x3014f9=['MidwayDecoratorService','target','params','ValidatorService','splice','./interface','methodArgs','locale','defineProperty','prototype','length','getClassMetadata','./config/config.default','decorator','decorate','search','56640CmWlxH','function','688737JZZDSm','1551GIknMi','method','getSchema','object','(((.+)+)+)+$','propertyName','query','__metadata','__decorate','methodName','res','@midwayjs/core','onReady','args','req','Configuration','1146556EnQJFN','2186RyeEng','I18N_ATTR_KEY','bound\x20dispatch','REQUEST_OBJ_CTX_KEY','name','request','CustomConfiguration','toString','apply','Inject','metadata','10Qgawcd','18HTVoZi','getMethodParamTypes','body','find','validator','assign','registerMethodHandler','design:type','getAttr','20901303uAyMkd','3019880Lngklo','407519qPOWdr','VALIDATOR_KEY'];a1_0x4033=function(){return _0x3014f9;};return a1_0x4033();}var __decorate=this&&this[a1_0xd5a01a(0xbe)]||function(_0x53c480,_0x36b0bb,_0x568b8c,_0x415390){const _0x4254e1=a1_0xd5a01a;var _0x13d6b6=arguments[_0x4254e1(0xad)],_0x5be43d=_0x13d6b6<0x3?_0x36b0bb:_0x415390===null?_0x415390=Object['getOwnPropertyDescriptor'](_0x36b0bb,_0x568b8c):_0x415390,_0x5549ba;if(typeof Reflect===_0x4254e1(0xb9)&&typeof Reflect[_0x4254e1(0xb1)]==='function')_0x5be43d=Reflect['decorate'](_0x53c480,_0x36b0bb,_0x568b8c,_0x415390);else{for(var _0x1b8a9e=_0x53c480['length']-0x1;_0x1b8a9e>=0x0;_0x1b8a9e--)if(_0x5549ba=_0x53c480[_0x1b8a9e])_0x5be43d=(_0x13d6b6<0x3?_0x5549ba(_0x5be43d):_0x13d6b6>0x3?_0x5549ba(_0x36b0bb,_0x568b8c,_0x5be43d):_0x5549ba(_0x36b0bb,_0x568b8c))||_0x5be43d;}return _0x13d6b6>0x3&&_0x5be43d&&Object[_0x4254e1(0xab)](_0x36b0bb,_0x568b8c,_0x5be43d),_0x5be43d;},__metadata=this&&this[a1_0xd5a01a(0xbd)]||function(_0x329f26,_0x5dcb17){const _0x196ffd=a1_0xd5a01a;if(typeof Reflect===_0x196ffd(0xb9)&&typeof Reflect['metadata']===_0x196ffd(0xb4))return Reflect[_0x196ffd(0x94)](_0x329f26,_0x5dcb17);};function a1_0x4c40(_0x540092,_0x5d9fe7){const _0x2cdefb=a1_0x4033();return a1_0x4c40=function(_0x2141e7,_0xa32e07){_0x2141e7=_0x2141e7-0x89;let _0x40331b=_0x2cdefb[_0x2141e7];return _0x40331b;},a1_0x4c40(_0x540092,_0x5d9fe7);}Object[a1_0xd5a01a(0xab)](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;const i18n_1=require('@midwayjs/i18n'),core_1=require('@midwayjs/core'),core_2=require(a1_0xd5a01a(0xc1)),interface_1=require(a1_0xd5a01a(0xa8)),ValidatorService_1=require('./service/ValidatorService'),i18n=require('@midwayjs/i18n'),anncic=require('@anncic-api/core'),ConfigDefault=require(a1_0xd5a01a(0xaf));let CustomConfiguration=class CustomConfiguration{async[a1_0xd5a01a(0xc2)](){const _0x53775b=a1_0xd5a01a;this[_0x53775b(0xb0)][_0x53775b(0x9c)](interface_1[_0x53775b(0xa2)],_0x9cfb1b=>{const _0x419dac=_0x53775b,_0x3c9ba7=_0x9cfb1b[_0x419dac(0x94)],_0x322f2e=(0x0,core_2[_0x419dac(0x97)])(_0x9cfb1b[_0x419dac(0xa4)],_0x9cfb1b[_0x419dac(0xbb)]);return{'before':_0x223faa=>{const _0x587656=_0x419dac;var _0x3157ac,_0x8fabcf,_0x31c95d,_0x6afe56,_0x2dbd18,_0x242652,_0x528c3b,_0x462366,_0x18c87f,_0x34badc,_0x1fc4ed,_0x4a6db4,_0x250c7a;const _0x59958f=_0x223faa[_0x587656(0xa4)][core_1[_0x587656(0x8d)]],_0x47baa4=Object[_0x587656(0x9b)]({},((_0x3157ac=_0x59958f===null||_0x59958f===void 0x0?void 0x0:_0x59958f[_0x587656(0x8f)])===null||_0x3157ac===void 0x0?void 0x0:_0x3157ac[_0x587656(0xbc)])||{},((_0x8fabcf=_0x59958f===null||_0x59958f===void 0x0?void 0x0:_0x59958f[_0x587656(0x8f)])===null||_0x8fabcf===void 0x0?void 0x0:_0x8fabcf[_0x587656(0x98)])||{}),_0x32ea5e=((0x0,core_2[_0x587656(0xae)])(interface_1[_0x587656(0xa2)],_0x223faa[_0x587656(0xa4)])||[])[_0x587656(0x99)](_0x40aaea=>_0x40aaea[_0x587656(0xb7)]==_0x223faa[_0x587656(0xbf)]);!(_0x3c9ba7===null||_0x3c9ba7===void 0x0?void 0x0:_0x3c9ba7[_0x587656(0xaa)])&&_0x59958f&&_0x59958f['getAttr']&&(_0x3c9ba7['locale']=_0x59958f[_0x587656(0x9e)](i18n_1[_0x587656(0x8b)]));for(let _0x361c79=0x0;_0x361c79<_0x322f2e[_0x587656(0xad)];_0x361c79++){const _0x2b314b=_0x322f2e[_0x361c79],_0x42ca64=this[_0x587656(0xa6)][_0x587656(0xb8)](_0x2b314b);if(_0x42ca64){if(typeof _0x223faa[_0x587656(0xc3)][_0x361c79]=='undefined'||((_0x31c95d=_0x223faa[_0x587656(0xc3)][_0x361c79])===null||_0x31c95d===void 0x0?void 0x0:_0x31c95d[_0x587656(0x8f)])&&((_0x6afe56=_0x223faa['args'][_0x361c79])===null||_0x6afe56===void 0x0?void 0x0:_0x6afe56[_0x587656(0xc0)])&&((_0x2dbd18=_0x223faa[_0x587656(0xc3)][_0x361c79])===null||_0x2dbd18===void 0x0?void 0x0:_0x2dbd18[_0x587656(0xc4)]))_0x223faa['args'][_0x361c79]=_0x47baa4;else((_0x242652=_0x223faa[_0x587656(0xc3)][_0x361c79])===null||_0x242652===void 0x0?void 0x0:_0x242652[_0x587656(0x8e)])==_0x587656(0x8c)&&_0x223faa[_0x587656(0xc3)][_0x587656(0xa7)](_0x361c79,0x0,_0x47baa4);const _0x15baaf=this[_0x587656(0xa6)][_0x587656(0x9a)](_0x42ca64,_0x223faa[_0x587656(0xc3)][_0x361c79],_0x3c9ba7);_0x15baaf&&(_0x223faa[_0x587656(0xc3)][_0x361c79]=_0x15baaf);}else{if((_0x32ea5e===null||_0x32ea5e===void 0x0?void 0x0:_0x32ea5e[_0x587656(0xa9)][_0x361c79])&&((_0x528c3b=_0x223faa['args'][_0x361c79])===null||_0x528c3b===void 0x0?void 0x0:_0x528c3b['params'])&&typeof _0x223faa['args'][_0x361c79]['param']==_0x587656(0xb4)&&((_0x462366=_0x59958f===null||_0x59958f===void 0x0?void 0x0:_0x59958f['params'])===null||_0x462366===void 0x0?void 0x0:_0x462366[_0x32ea5e[_0x587656(0xa9)][_0x361c79]]))_0x223faa['args'][_0x361c79]=_0x2b314b((_0x18c87f=_0x59958f===null||_0x59958f===void 0x0?void 0x0:_0x59958f[_0x587656(0xa5)])===null||_0x18c87f===void 0x0?void 0x0:_0x18c87f[_0x32ea5e[_0x587656(0xa9)][_0x361c79]]);else(_0x32ea5e===null||_0x32ea5e===void 0x0?void 0x0:_0x32ea5e[_0x587656(0xa9)][_0x361c79])&&((_0x1fc4ed=(_0x34badc=_0x223faa[_0x587656(0xc3)][_0x361c79])===null||_0x34badc===void 0x0?void 0x0:_0x34badc[_0x587656(0xa5)])===null||_0x1fc4ed===void 0x0?void 0x0:_0x1fc4ed[_0x32ea5e[_0x587656(0xa9)][_0x361c79]])&&(_0x223faa[_0x587656(0xc3)][_0x361c79]=(_0x250c7a=(_0x4a6db4=_0x223faa[_0x587656(0xc3)][_0x361c79])===null||_0x4a6db4===void 0x0?void 0x0:_0x4a6db4[_0x587656(0xa5)])===null||_0x250c7a===void 0x0?void 0x0:_0x250c7a[_0x32ea5e[_0x587656(0xa9)][_0x361c79]]);}}},'afterThrow':(_0xb06767,_0x364652)=>{throw _0x364652;}};});}};exports[a1_0xd5a01a(0x90)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0xd5a01a(0x93)])(),__metadata(a1_0xd5a01a(0x9d),core_1[a1_0xd5a01a(0xa3)])],CustomConfiguration[a1_0xd5a01a(0xac)],a1_0xd5a01a(0xb0),void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0xd5a01a(0x9d),ValidatorService_1[a1_0xd5a01a(0xa6)])],CustomConfiguration[a1_0xd5a01a(0xac)],a1_0xd5a01a(0xa6),void 0x0),exports[a1_0xd5a01a(0x90)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0xd5a01a(0xc5)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':'anncic-api:validator','importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x4bae7f=a2_0x1239;(function(_0x374569,_0x514354){const _0x413ee2=a2_0x1239,_0x526d58=_0x374569();while(!![]){try{const _0x1f730a=parseInt(_0x413ee2(0x1ec))/0x1*(parseInt(_0x413ee2(0x1f6))/0x2)+parseInt(_0x413ee2(0x1f0))/0x3+-parseInt(_0x413ee2(0x201))/0x4+-parseInt(_0x413ee2(0x20d))/0x5*(-parseInt(_0x413ee2(0x1fb))/0x6)+parseInt(_0x413ee2(0x205))/0x7+-parseInt(_0x413ee2(0x1ea))/0x8*(parseInt(_0x413ee2(0x1fd))/0x9)+-parseInt(_0x413ee2(0x1ee))/0xa*(parseInt(_0x413ee2(0x20c))/0xb);if(_0x1f730a===_0x514354)break;else _0x526d58['push'](_0x526d58['shift']());}catch(_0x3a444d){_0x526d58['push'](_0x526d58['shift']());}}}(a2_0x5aaf,0xd914b));function a2_0x1239(_0x5f1a1f,_0x43999c){const _0x4948a9=a2_0x5aaf();return a2_0x1239=function(_0x526815,_0x46a376){_0x526815=_0x526815-0x1ea;let _0x5aafb2=_0x4948a9[_0x526815];return _0x5aafb2;},a2_0x1239(_0x5f1a1f,_0x43999c);}const a2_0x46a376=(function(){let _0x24dcd2=!![];return function(_0x237fb2,_0xd9243){const _0x396725=_0x24dcd2?function(){const _0x51506f=a2_0x1239;if(_0xd9243){const _0x5893d7=_0xd9243[_0x51506f(0x208)](_0x237fb2,arguments);return _0xd9243=null,_0x5893d7;}}:function(){};return _0x24dcd2=![],_0x396725;};}()),a2_0x526815=a2_0x46a376(this,function(){const _0x1d38de=a2_0x1239;return a2_0x526815['toString']()['search'](_0x1d38de(0x206))[_0x1d38de(0x20a)]()[_0x1d38de(0x20e)](a2_0x526815)[_0x1d38de(0x1f9)]('(((.+)+)+)+$');});a2_0x526815();'use strict';Object[a2_0x4bae7f(0x1f8)](exports,a2_0x4bae7f(0x1fe),{'value':!![]}),exports['Rule']=exports['RuleType']=void 0x0;const joi=require(a2_0x4bae7f(0x1fc)),date_1=require(a2_0x4bae7f(0x1f1)),core_1=require(a2_0x4bae7f(0x1f2)),interface_1=require(a2_0x4bae7f(0x20b));exports[a2_0x4bae7f(0x1ed)]=joi['extend'](date_1[a2_0x4bae7f(0x1ff)]);function Rule(_0x3fa9cf,_0x38020c,_0x4f4132=''){return(_0x42c205,_0x5a5562)=>{const _0x5d6da8=a2_0x1239;var _0x13bd57;if(_0x5a5562)!joi[_0x5d6da8(0x209)](_0x38020c)&&(_0x38020c===null||_0x38020c===void 0x0?void 0x0:_0x38020c[_0x5d6da8(0x1f5)])&&(_0x38020c=joi[_0x5d6da8(0x210)]((0x0,core_1[_0x5d6da8(0x1fa)])(interface_1[_0x5d6da8(0x1f3)],_0x38020c))[_0x5d6da8(0x1f4)]({'id':_0x38020c[_0x5d6da8(0x1f5)]}),(0x0,core_1['getPropertyType'])(_0x42c205,_0x5a5562)['name']===_0x5d6da8(0x207)&&(_0x38020c=joi[_0x5d6da8(0x211)]()[_0x5d6da8(0x203)](_0x38020c))),joi[_0x5d6da8(0x209)](_0x38020c)&&(_0x3fa9cf&&typeof(_0x38020c===null||_0x38020c===void 0x0?void 0x0:_0x38020c[_0x5d6da8(0x204)])==_0x5d6da8(0x20f)&&(_0x38020c=_0x38020c[_0x5d6da8(0x204)](_0x3fa9cf)),_0x4f4132&&typeof(_0x38020c===null||_0x38020c===void 0x0?void 0x0:_0x38020c['description'])=='function'&&(_0x38020c=_0x38020c[_0x5d6da8(0x200)](_0x4f4132)),(0x0,core_1[_0x5d6da8(0x1eb)])(interface_1[_0x5d6da8(0x1f3)],_0x38020c,_0x42c205,_0x5a5562));else{const _0xd74cd7=(0x0,core_1[_0x5d6da8(0x1fa)])(interface_1['RULES_KEY'],_0x38020c);if(_0xd74cd7){let _0x280545=(_0x13bd57=(0x0,core_1['getClassMetadata'])(interface_1[_0x5d6da8(0x1f3)],_0x42c205))!==null&&_0x13bd57!==void 0x0?_0x13bd57:{};Object[_0x5d6da8(0x1f7)](_0xd74cd7)[_0x5d6da8(0x1ef)](_0x491d8d=>{!_0x280545[_0x491d8d]&&(_0x280545[_0x491d8d]=_0xd74cd7[_0x491d8d]);}),(0x0,core_1[_0x5d6da8(0x202)])(interface_1[_0x5d6da8(0x1f3)],_0x280545,_0x42c205);}}};}exports['Rule']=Rule;function a2_0x5aaf(){const _0x28e31c=['RuleType','20uzxJqp','map','491769epGoSN','@joi/date','@midwayjs/core','RULES_KEY','meta','name','80UXXMNb','keys','defineProperty','search','getClassMetadata','72IRETNr','joi','206190fmyqCX','__esModule','default','description','5159896TDJaoJ','saveClassMetadata','items','label','6528494wKjwQU','(((.+)+)+)+$','Array','apply','isSchema','toString','../interface','83501GGNstl','329360MCprOm','constructor','function','object','array','8sZfkHV','attachClassMetadata','8255veVgrv'];a2_0x5aaf=function(){return _0x28e31c;};return a2_0x5aaf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a3_0x2d18(){const _0x4f38da=['937oaTDgd','(((.+)+)+)+$','148TBfhks','8FUcaTw','922439RGIHix','slice','replace','toString','indexOf','attachClassMetadata','VALIDATOR_KEY','227277YYPBYw','prototype','3443cQyJrt','82270nCDlTw','function','Validator','__esModule','6940Swzjwn','55509fWokTb','@midwayjs/core','search','42Lisngn','constructor','../interface','328856BLVxxY','match','apply'];a3_0x2d18=function(){return _0x4f38da;};return a3_0x2d18();}const a3_0x5cd962=a3_0x38f9;(function(_0x316787,_0x34f85b){const _0x5a3bb3=a3_0x38f9,_0x624c86=_0x316787();while(!![]){try{const _0x433756=-parseInt(_0x5a3bb3(0xc5))/0x1*(parseInt(_0x5a3bb3(0xc7))/0x2)+-parseInt(_0x5a3bb3(0xbc))/0x3*(parseInt(_0x5a3bb3(0xc8))/0x4)+-parseInt(_0x5a3bb3(0xd3))/0x5*(-parseInt(_0x5a3bb3(0xbf))/0x6)+-parseInt(_0x5a3bb3(0xc9))/0x7+parseInt(_0x5a3bb3(0xc2))/0x8+-parseInt(_0x5a3bb3(0xd0))/0x9+-parseInt(_0x5a3bb3(0xbb))/0xa*(-parseInt(_0x5a3bb3(0xd2))/0xb);if(_0x433756===_0x34f85b)break;else _0x624c86['push'](_0x624c86['shift']());}catch(_0xa29c28){_0x624c86['push'](_0x624c86['shift']());}}}(a3_0x2d18,0x1ae35));const a3_0x4ba618=(function(){let _0x322b24=!![];return function(_0x4ac661,_0x58cf2c){const _0xf719dd=_0x322b24?function(){const _0x3cc8cf=a3_0x38f9;if(_0x58cf2c){const _0x4fc4f3=_0x58cf2c[_0x3cc8cf(0xc4)](_0x4ac661,arguments);return _0x58cf2c=null,_0x4fc4f3;}}:function(){};return _0x322b24=![],_0xf719dd;};}()),a3_0x548dbf=a3_0x4ba618(this,function(){const _0x46c020=a3_0x38f9;return a3_0x548dbf[_0x46c020(0xcc)]()[_0x46c020(0xbe)](_0x46c020(0xc6))[_0x46c020(0xcc)]()[_0x46c020(0xc0)](a3_0x548dbf)[_0x46c020(0xbe)]('(((.+)+)+)+$');});a3_0x548dbf();function a3_0x38f9(_0x30e2e6,_0x260b62){const _0x21b802=a3_0x2d18();return a3_0x38f9=function(_0x548dbf,_0x4ba618){_0x548dbf=_0x548dbf-0xb8;let _0x2d182f=_0x21b802[_0x548dbf];return _0x2d182f;},a3_0x38f9(_0x30e2e6,_0x260b62);}'use strict';Object['defineProperty'](exports,a3_0x5cd962(0xba),{'value':!![]}),exports['getFuncArgs']=exports[a3_0x5cd962(0xb9)]=void 0x0;const core_1=require(a3_0x5cd962(0xbd)),interface_1=require(a3_0x5cd962(0xc1));function Validator(_0x58e7c7={}){return(_0x10014f,_0x399beb,_0x59770d)=>{const _0x4d47e3=a3_0x38f9,_0x3f7b97=getFuncArgs(_0x10014f[_0x399beb]);(0x0,core_1[_0x4d47e3(0xce)])(interface_1['VALIDATOR_KEY'],{'method':_0x399beb,'methodArgs':_0x3f7b97},_0x10014f),(0x0,core_1['createCustomMethodDecorator'])(interface_1[_0x4d47e3(0xcf)],_0x58e7c7)(_0x10014f,_0x399beb,_0x59770d);};}exports[a3_0x5cd962(0xb9)]=Validator;function getFuncArgs(_0x504237){const _0x4ba528=a3_0x5cd962;if(typeof _0x504237==_0x4ba528(0xb8)){const _0x23f147=/=>.*$/mg,_0x405d88=/=[^,)]+/mg,_0x1910d1=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x52a825=(_0x504237[_0x4ba528(0xd1)]?_0x504237[_0x4ba528(0xd1)][_0x4ba528(0xc0)]['toString']():_0x504237[_0x4ba528(0xcc)]())[_0x4ba528(0xcb)](_0x1910d1,'')[_0x4ba528(0xcb)](_0x23f147,'')['replace'](_0x405d88,''),_0x29cc46=_0x52a825[_0x4ba528(0xca)](_0x52a825[_0x4ba528(0xcd)]('(')+0x1,_0x52a825[_0x4ba528(0xcd)](')'))[_0x4ba528(0xc3)](/([^\s,]+)/g)||[];return _0x29cc46;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x231aa1=a4_0x1c66;(function(_0x398441,_0x42edaa){var _0x4a62be=a4_0x1c66,_0x4da569=_0x398441();while(!![]){try{var _0xa8f509=-parseInt(_0x4a62be(0x17a))/0x1*(-parseInt(_0x4a62be(0x181))/0x2)+parseInt(_0x4a62be(0x188))/0x3*(parseInt(_0x4a62be(0x186))/0x4)+parseInt(_0x4a62be(0x18c))/0x5+-parseInt(_0x4a62be(0x182))/0x6+parseInt(_0x4a62be(0x172))/0x7*(-parseInt(_0x4a62be(0x189))/0x8)+parseInt(_0x4a62be(0x176))/0x9+-parseInt(_0x4a62be(0x174))/0xa;if(_0xa8f509===_0x42edaa)break;else _0x4da569['push'](_0x4da569['shift']());}catch(_0x564696){_0x4da569['push'](_0x4da569['shift']());}}}(a4_0x2ceb,0xadff7));var a4_0x6735ad=(function(){var _0x3edb3c=!![];return function(_0x4d20cb,_0x1a8ad5){var _0x2c91ca=_0x3edb3c?function(){var _0x48172b=a4_0x1c66;if(_0x1a8ad5){var _0x14f5b5=_0x1a8ad5[_0x48172b(0x177)](_0x4d20cb,arguments);return _0x1a8ad5=null,_0x14f5b5;}}:function(){};return _0x3edb3c=![],_0x2c91ca;};}()),a4_0x35dfe9=a4_0x6735ad(this,function(){var _0x5862fb=a4_0x1c66;return a4_0x35dfe9['toString']()[_0x5862fb(0x180)](_0x5862fb(0x17b))[_0x5862fb(0x179)]()[_0x5862fb(0x18b)](a4_0x35dfe9)[_0x5862fb(0x180)](_0x5862fb(0x17b));});a4_0x35dfe9();function a4_0x1c66(_0xa4a9d8,_0x4c0d64){var _0x1b4b80=a4_0x2ceb();return a4_0x1c66=function(_0x35dfe9,_0x6735ad){_0x35dfe9=_0x35dfe9-0x172;var _0x2cebc1=_0x1b4b80[_0x35dfe9];return _0x2cebc1;},a4_0x1c66(_0xa4a9d8,_0x4c0d64);}'use strict';function a4_0x2ceb(){var _0x723054=['object','constructor','3164005kDQgsK','参数验证失败','PARAMS','design:type','493556CRbDRw','ValidatorError','8461140AvYytS','__esModule','10491480BCaDsp','apply','length','toString','249xQioHA','(((.+)+)+)+$','@anncic-api/core','function','__metadata','NOFIND_SCHEMA','search','648GazpgF','4913454gTsAXp','metadata','defineProperty','AnnErrorMsg','796rXeHyD','decorate','13893KzUzqa','48DFnBEL'];a4_0x2ceb=function(){return _0x723054;};return a4_0x2ceb();}var __decorate=this&&this['__decorate']||function(_0x176da0,_0x24431d,_0x281e04,_0x1ef9c4){var _0x56854d=a4_0x1c66,_0x1c0a87=arguments[_0x56854d(0x178)],_0x7f1fd0=_0x1c0a87<0x3?_0x24431d:_0x1ef9c4===null?_0x1ef9c4=Object['getOwnPropertyDescriptor'](_0x24431d,_0x281e04):_0x1ef9c4,_0x12dd2a;if(typeof Reflect===_0x56854d(0x18a)&&typeof Reflect[_0x56854d(0x187)]===_0x56854d(0x17d))_0x7f1fd0=Reflect[_0x56854d(0x187)](_0x176da0,_0x24431d,_0x281e04,_0x1ef9c4);else{for(var _0xb05ca8=_0x176da0[_0x56854d(0x178)]-0x1;_0xb05ca8>=0x0;_0xb05ca8--)if(_0x12dd2a=_0x176da0[_0xb05ca8])_0x7f1fd0=(_0x1c0a87<0x3?_0x12dd2a(_0x7f1fd0):_0x1c0a87>0x3?_0x12dd2a(_0x24431d,_0x281e04,_0x7f1fd0):_0x12dd2a(_0x24431d,_0x281e04))||_0x7f1fd0;}return _0x1c0a87>0x3&&_0x7f1fd0&&Object[_0x56854d(0x184)](_0x24431d,_0x281e04,_0x7f1fd0),_0x7f1fd0;},__metadata=this&&this[a4_0x231aa1(0x17e)]||function(_0x41f93d,_0x112021){var _0x2418b7=a4_0x231aa1;if(typeof Reflect==='object'&&typeof Reflect[_0x2418b7(0x183)]===_0x2418b7(0x17d))return Reflect['metadata'](_0x41f93d,_0x112021);};Object[a4_0x231aa1(0x184)](exports,a4_0x231aa1(0x175),{'value':!![]}),exports[a4_0x231aa1(0x173)]=void 0x0;const core_1=require(a4_0x231aa1(0x17c));class ValidatorError extends AnnError{}exports['ValidatorError']=ValidatorError,ValidatorError[a4_0x231aa1(0x18e)]=0x18c1e,ValidatorError[a4_0x231aa1(0x17f)]=0x18c1c,__decorate([(0x0,core_1[a4_0x231aa1(0x185)])(a4_0x231aa1(0x18d)),__metadata(a4_0x231aa1(0x18f),Object)],ValidatorError,a4_0x231aa1(0x18e),void 0x0),__decorate([(0x0,core_1[a4_0x231aa1(0x185)])(a4_0x231aa1(0x18d)),__metadata(a4_0x231aa1(0x18f),Object)],ValidatorError,a4_0x231aa1(0x17f),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x168e44=a5_0x364d;function a5_0x1185(){const _0x127935=['3780XnXCZF','3035942uxMfRh','saveClassMetadata','OmitDto','192698ICplPl','4378664LEuGzU','6sTcOuF','2908890RSxUcB','prototype','getClassExtendedMetadata','4eWQBMY','defineProperty','269401BCRIQC','4670010lCTHrX','search','16641CHQAAx','(((.+)+)+)+$','RULES_KEY','@midwayjs/core','PickDto','toString'];a5_0x1185=function(){return _0x127935;};return a5_0x1185();}(function(_0x3a58b9,_0x3f4c82){const _0x2ed377=a5_0x364d,_0xfd494=_0x3a58b9();while(!![]){try{const _0x42e6f9=parseInt(_0x2ed377(0x113))/0x1+-parseInt(_0x2ed377(0x10b))/0x2*(parseInt(_0x2ed377(0x10d))/0x3)+-parseInt(_0x2ed377(0x111))/0x4*(parseInt(_0x2ed377(0x10e))/0x5)+-parseInt(_0x2ed377(0x114))/0x6+parseInt(_0x2ed377(0x108))/0x7+parseInt(_0x2ed377(0x10c))/0x8+parseInt(_0x2ed377(0x116))/0x9*(parseInt(_0x2ed377(0x107))/0xa);if(_0x42e6f9===_0x3f4c82)break;else _0xfd494['push'](_0xfd494['shift']());}catch(_0x586ce1){_0xfd494['push'](_0xfd494['shift']());}}}(a5_0x1185,0x60d07));const a5_0x33afff=(function(){let _0x115cfd=!![];return function(_0x2ef8c2,_0x5c7659){const _0x30e098=_0x115cfd?function(){if(_0x5c7659){const _0xb0b89f=_0x5c7659['apply'](_0x2ef8c2,arguments);return _0x5c7659=null,_0xb0b89f;}}:function(){};return _0x115cfd=![],_0x30e098;};}()),a5_0x46962d=a5_0x33afff(this,function(){const _0x2f491a=a5_0x364d;return a5_0x46962d['toString']()[_0x2f491a(0x115)](_0x2f491a(0x117))[_0x2f491a(0x11b)]()['constructor'](a5_0x46962d)['search']('(((.+)+)+)+$');});a5_0x46962d();'use strict';function a5_0x364d(_0x544353,_0x2381aa){const _0x22315a=a5_0x1185();return a5_0x364d=function(_0x46962d,_0x33afff){_0x46962d=_0x46962d-0x107;let _0x118503=_0x22315a[_0x46962d];return _0x118503;},a5_0x364d(_0x544353,_0x2381aa);}Object[a5_0x168e44(0x112)](exports,'__esModule',{'value':!![]}),exports[a5_0x168e44(0x10a)]=exports['PickDto']=void 0x0;const core_1=require(a5_0x168e44(0x119)),interface_1=require('../interface');function PickDto(_0x4448f3,_0x539b40){const _0x2d0cc8=a5_0x168e44,_0x971d58=function(){};_0x971d58[_0x2d0cc8(0x10f)]=_0x4448f3['prototype'];const _0x49ca31=(0x0,core_1[_0x2d0cc8(0x110)])(interface_1[_0x2d0cc8(0x118)],_0x4448f3),_0x1e9be3={};for(const _0x3ee801 of _0x539b40){_0x49ca31[_0x3ee801]&&(_0x1e9be3[_0x3ee801]=_0x49ca31[_0x3ee801]);}return(0x0,core_1[_0x2d0cc8(0x109)])(interface_1['RULES_KEY'],_0x1e9be3,_0x971d58),_0x971d58;}exports[a5_0x168e44(0x11a)]=PickDto;function OmitDto(_0x29c650,_0x4947fc){const _0x1591d0=a5_0x168e44,_0x1e8db4=function(){};_0x1e8db4[_0x1591d0(0x10f)]=_0x29c650[_0x1591d0(0x10f)];const _0x5b34e1=(0x0,core_1[_0x1591d0(0x110)])(interface_1['RULES_KEY'],_0x29c650),_0x2f4a1c=Object['assign']({},_0x5b34e1);for(const _0x1af145 of _0x4947fc){delete _0x2f4a1c[_0x1af145];}return(0x0,core_1[_0x1591d0(0x109)])(interface_1['RULES_KEY'],_0x2f4a1c,_0x1e8db4),_0x1e8db4;}exports[a5_0x168e44(0x10a)]=OmitDto;
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a6_0x37f3(_0x3af9ee,_0x353753){const _0x2ed819=a6_0x486a();return a6_0x37f3=function(_0x46430,_0x14c1ca){_0x46430=_0x46430-0xb1;let _0x486a26=_0x2ed819[_0x46430];return _0x486a26;},a6_0x37f3(_0x3af9ee,_0x353753);}const a6_0x3a08ee=a6_0x37f3;(function(_0x3598f0,_0x38263){const _0x2aeb3f=a6_0x37f3,_0x188a75=_0x3598f0();while(!![]){try{const _0x199152=-parseInt(_0x2aeb3f(0xc4))/0x1+-parseInt(_0x2aeb3f(0xb6))/0x2+-parseInt(_0x2aeb3f(0xb3))/0x3+parseInt(_0x2aeb3f(0xc0))/0x4+parseInt(_0x2aeb3f(0xb1))/0x5+parseInt(_0x2aeb3f(0xc3))/0x6*(parseInt(_0x2aeb3f(0xbd))/0x7)+parseInt(_0x2aeb3f(0xb7))/0x8*(parseInt(_0x2aeb3f(0xb9))/0x9);if(_0x199152===_0x38263)break;else _0x188a75['push'](_0x188a75['shift']());}catch(_0x4e58b4){_0x188a75['push'](_0x188a75['shift']());}}}(a6_0x486a,0xf00ef));const a6_0x14c1ca=(function(){let _0x253d90=!![];return function(_0x15fed8,_0x516a45){const _0x2eac45=_0x253d90?function(){const _0x325348=a6_0x37f3;if(_0x516a45){const _0x5e5f4f=_0x516a45[_0x325348(0xbf)](_0x15fed8,arguments);return _0x516a45=null,_0x5e5f4f;}}:function(){};return _0x253d90=![],_0x2eac45;};}()),a6_0x46430=a6_0x14c1ca(this,function(){const _0x3534f7=a6_0x37f3;return a6_0x46430[_0x3534f7(0xb2)]()[_0x3534f7(0xc1)](_0x3534f7(0xbc))['toString']()[_0x3534f7(0xbb)](a6_0x46430)[_0x3534f7(0xc1)]('(((.+)+)+)+$');});a6_0x46430();'use strict';Object['defineProperty'](exports,a6_0x3a08ee(0xb8),{'value':!![]}),exports[a6_0x3a08ee(0xb5)]=void 0x0;function a6_0x486a(){const _0x1aaecd=['@midwayjs/core','3498aWvNMU','213834NqqgEw','object','4268650FStZcM','toString','4784139MbFBHH','RULES_KEY','getSchema','3883406NfmBAX','16DWgnDZ','__esModule','4706271UcytKA','joi','constructor','(((.+)+)+)+$','11599MFJbMe','../interface','apply','7471720IsKlih','search'];a6_0x486a=function(){return _0x1aaecd;};return a6_0x486a();}const Joi=require(a6_0x3a08ee(0xba)),core_1=require(a6_0x3a08ee(0xc2)),interface_1=require(a6_0x3a08ee(0xbe));function getSchema(_0x4bb1da){const _0x534fd7=a6_0x3a08ee,_0x2e4019=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x534fd7(0xb4)],_0x4bb1da);if(_0x2e4019)return Joi[_0x534fd7(0xc5)](_0x2e4019);}exports[a6_0x3a08ee(0xb5)]=getSchema;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a7_0x383c(){var _0x19ad8a=['default','1315172UyHtRr','hasOwnProperty','constructor','Configuration','./exception/ValidatorError','defineProperty','ValidatorService','4090045DKinWz','19854cuDJVo','Validator','376672NUBjbK','(((.+)+)+)+$','2145906UCiNLX','RuleType','35RUXfVZ','854214BnAfKE','call','toString','./service/ValidatorService','./interface','ValidatorError','get','16190KodCrs','1195804oqNJiL','3fqVSOI','apply','./helper/dtoHelper','./helper/getSchema','./decorator/Validator','__esModule','Rule','configurable','./decorator/Rule','__createBinding'];a7_0x383c=function(){return _0x19ad8a;};return a7_0x383c();}var a7_0x4225ef=a7_0x3ec7;(function(_0x17184b,_0x479366){var _0x5e6681=a7_0x3ec7,_0x24d7d7=_0x17184b();while(!![]){try{var _0x3bc473=-parseInt(_0x5e6681(0x14e))/0x1+-parseInt(_0x5e6681(0x143))/0x2+-parseInt(_0x5e6681(0x14f))/0x3*(parseInt(_0x5e6681(0x15a))/0x4)+-parseInt(_0x5e6681(0x161))/0x5+-parseInt(_0x5e6681(0x146))/0x6*(-parseInt(_0x5e6681(0x145))/0x7)+-parseInt(_0x5e6681(0x164))/0x8+parseInt(_0x5e6681(0x162))/0x9*(parseInt(_0x5e6681(0x14d))/0xa);if(_0x3bc473===_0x479366)break;else _0x24d7d7['push'](_0x24d7d7['shift']());}catch(_0x205fde){_0x24d7d7['push'](_0x24d7d7['shift']());}}}(a7_0x383c,0xc85ec));var a7_0x2bd8e2=(function(){var _0x2cd2a8=!![];return function(_0x4bc2d5,_0xea0199){var _0x236d7e=_0x2cd2a8?function(){var _0x2648df=a7_0x3ec7;if(_0xea0199){var _0x3e45a5=_0xea0199[_0x2648df(0x150)](_0x4bc2d5,arguments);return _0xea0199=null,_0x3e45a5;}}:function(){};return _0x2cd2a8=![],_0x236d7e;};}()),a7_0x58f0ff=a7_0x2bd8e2(this,function(){var _0x2defa6=a7_0x3ec7;return a7_0x58f0ff[_0x2defa6(0x148)]()['search'](_0x2defa6(0x165))[_0x2defa6(0x148)]()[_0x2defa6(0x15c)](a7_0x58f0ff)['search'](_0x2defa6(0x165));});a7_0x58f0ff();'use strict';var __createBinding=this&&this[a7_0x4225ef(0x158)]||(Object['create']?function(_0x2b1bde,_0x177ff8,_0x439ac8,_0x146b4c){var _0x3cbd2a=a7_0x4225ef;if(_0x146b4c===undefined)_0x146b4c=_0x439ac8;var _0x4ede2f=Object['getOwnPropertyDescriptor'](_0x177ff8,_0x439ac8);(!_0x4ede2f||(_0x3cbd2a(0x14c)in _0x4ede2f?!_0x177ff8[_0x3cbd2a(0x154)]:_0x4ede2f['writable']||_0x4ede2f[_0x3cbd2a(0x156)]))&&(_0x4ede2f={'enumerable':!![],'get':function(){return _0x177ff8[_0x439ac8];}}),Object[_0x3cbd2a(0x15f)](_0x2b1bde,_0x146b4c,_0x4ede2f);}:function(_0x296486,_0x477dd2,_0x30e84d,_0xf5fb6a){if(_0xf5fb6a===undefined)_0xf5fb6a=_0x30e84d;_0x296486[_0xf5fb6a]=_0x477dd2[_0x30e84d];}),__exportStar=this&&this['__exportStar']||function(_0x32c7f5,_0x5e7140){var _0xe5fb56=a7_0x4225ef;for(var _0x20f778 in _0x32c7f5)if(_0x20f778!==_0xe5fb56(0x159)&&!Object['prototype'][_0xe5fb56(0x15b)][_0xe5fb56(0x147)](_0x5e7140,_0x20f778))__createBinding(_0x5e7140,_0x32c7f5,_0x20f778);};Object[a7_0x4225ef(0x15f)](exports,a7_0x4225ef(0x154),{'value':!![]}),exports[a7_0x4225ef(0x15d)]=exports['ValidatorService']=exports[a7_0x4225ef(0x14b)]=exports['RuleType']=exports[a7_0x4225ef(0x155)]=exports[a7_0x4225ef(0x163)]=void 0x0,__exportStar(require(a7_0x4225ef(0x14a)),exports),__exportStar(require(a7_0x4225ef(0x151)),exports),__exportStar(require(a7_0x4225ef(0x152)),exports);var Validator_1=require(a7_0x4225ef(0x153));Object[a7_0x4225ef(0x15f)](exports,a7_0x4225ef(0x163),{'enumerable':!![],'get':function(){var _0x4c704d=a7_0x4225ef;return Validator_1[_0x4c704d(0x163)];}});var Rule_1=require(a7_0x4225ef(0x157));Object[a7_0x4225ef(0x15f)](exports,'Rule',{'enumerable':!![],'get':function(){var _0x4597ef=a7_0x4225ef;return Rule_1[_0x4597ef(0x155)];}}),Object[a7_0x4225ef(0x15f)](exports,a7_0x4225ef(0x144),{'enumerable':!![],'get':function(){var _0x5bf9c1=a7_0x4225ef;return Rule_1[_0x5bf9c1(0x144)];}});function a7_0x3ec7(_0x5756bd,_0x540bae){var _0x4df56e=a7_0x383c();return a7_0x3ec7=function(_0x58f0ff,_0x2bd8e2){_0x58f0ff=_0x58f0ff-0x143;var _0x383c6e=_0x4df56e[_0x58f0ff];return _0x383c6e;},a7_0x3ec7(_0x5756bd,_0x540bae);}var ValidatorError_1=require(a7_0x4225ef(0x15e));Object['defineProperty'](exports,a7_0x4225ef(0x14b),{'enumerable':!![],'get':function(){var _0xe431df=a7_0x4225ef;return ValidatorError_1[_0xe431df(0x14b)];}});var ValidatorService_1=require(a7_0x4225ef(0x149));Object['defineProperty'](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x26de45=a7_0x4225ef;return ValidatorService_1[_0x26de45(0x160)];}});var configuration_1=require('./configuration');Object['defineProperty'](exports,a7_0x4225ef(0x15d),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a8_0x4c6f19=a8_0x17d3;function a8_0x17d3(_0x54fe52,_0x5e5eba){var _0xf49f77=a8_0x5e41();return a8_0x17d3=function(_0x5e5a91,_0x3a3843){_0x5e5a91=_0x5e5a91-0x15f;var _0x5e41da=_0xf49f77[_0x5e5a91];return _0x5e41da;},a8_0x17d3(_0x54fe52,_0x5e5eba);}(function(_0x57cf7f,_0x411e4d){var _0x445318=a8_0x17d3,_0x41558e=_0x57cf7f();while(!![]){try{var _0x4111d2=parseInt(_0x445318(0x16f))/0x1*(parseInt(_0x445318(0x16d))/0x2)+-parseInt(_0x445318(0x166))/0x3+-parseInt(_0x445318(0x163))/0x4*(parseInt(_0x445318(0x169))/0x5)+parseInt(_0x445318(0x171))/0x6*(-parseInt(_0x445318(0x172))/0x7)+parseInt(_0x445318(0x162))/0x8+parseInt(_0x445318(0x160))/0x9*(-parseInt(_0x445318(0x161))/0xa)+parseInt(_0x445318(0x16a))/0xb*(parseInt(_0x445318(0x170))/0xc);if(_0x4111d2===_0x411e4d)break;else _0x41558e['push'](_0x41558e['shift']());}catch(_0x3884bc){_0x41558e['push'](_0x41558e['shift']());}}}(a8_0x5e41,0x27ffd));var a8_0x3a3843=(function(){var _0x372752=!![];return function(_0x806561,_0x4fa8e7){var _0x2538f6=_0x372752?function(){if(_0x4fa8e7){var _0x21c166=_0x4fa8e7['apply'](_0x806561,arguments);return _0x4fa8e7=null,_0x21c166;}}:function(){};return _0x372752=![],_0x2538f6;};}()),a8_0x5e5a91=a8_0x3a3843(this,function(){var _0x44c3a8=a8_0x17d3;return a8_0x5e5a91[_0x44c3a8(0x168)]()[_0x44c3a8(0x16b)](_0x44c3a8(0x165))[_0x44c3a8(0x168)]()[_0x44c3a8(0x16e)](a8_0x5e5a91)[_0x44c3a8(0x16b)](_0x44c3a8(0x165));});a8_0x5e5a91();function a8_0x5e41(){var _0x30a7a9=['894840PxOuKL','6wSjrGI','1006362MhwCUD','RULES_KEY','542367JhoMic','20qcuLwd','2440496NgEaxU','204FDLjnT','anncic-api:validator:validator','(((.+)+)+)+$','195450LucjwJ','__esModule','toString','4865lrhvEc','11XKzYaO','search','VALIDATOR_KEY','58uvmvqg','constructor','5630axtklD'];a8_0x5e41=function(){return _0x30a7a9;};return a8_0x5e41();}'use strict';Object['defineProperty'](exports,a8_0x4c6f19(0x167),{'value':!![]}),exports[a8_0x4c6f19(0x16c)]=exports['RULES_KEY']=void 0x0,exports[a8_0x4c6f19(0x15f)]='anncic-api:validator:rules',exports[a8_0x4c6f19(0x16c)]=a8_0x4c6f19(0x164);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a9_0xc1a833=a9_0x2fe8;(function(_0x51a8f8,_0x101a2c){const _0x5dd135=a9_0x2fe8,_0x2b25de=_0x51a8f8();while(!![]){try{const _0x41a526=parseInt(_0x5dd135(0x186))/0x1*(parseInt(_0x5dd135(0x195))/0x2)+parseInt(_0x5dd135(0x16a))/0x3+parseInt(_0x5dd135(0x189))/0x4*(parseInt(_0x5dd135(0x192))/0x5)+parseInt(_0x5dd135(0x168))/0x6+parseInt(_0x5dd135(0x18a))/0x7+parseInt(_0x5dd135(0x19f))/0x8+-parseInt(_0x5dd135(0x198))/0x9;if(_0x41a526===_0x101a2c)break;else _0x2b25de['push'](_0x2b25de['shift']());}catch(_0x2a2415){_0x2b25de['push'](_0x2b25de['shift']());}}}(a9_0x231e,0x64e7f));const a9_0x29e6da=(function(){let _0xd239bd=!![];return function(_0x5f3db7,_0x32bdeb){const _0x35f10f=_0xd239bd?function(){const _0x527c7b=a9_0x2fe8;if(_0x32bdeb){const _0x4ee857=_0x32bdeb[_0x527c7b(0x173)](_0x5f3db7,arguments);return _0x32bdeb=null,_0x4ee857;}}:function(){};return _0xd239bd=![],_0x35f10f;};}()),a9_0x2145a0=a9_0x29e6da(this,function(){const _0x57eea5=a9_0x2fe8;return a9_0x2145a0[_0x57eea5(0x16f)]()[_0x57eea5(0x178)](_0x57eea5(0x169))[_0x57eea5(0x16f)]()[_0x57eea5(0x199)](a9_0x2145a0)['search'](_0x57eea5(0x169));});a9_0x2145a0();'use strict';function a9_0x2fe8(_0x1bed6e,_0x3d0b5d){const _0x5141f1=a9_0x231e();return a9_0x2fe8=function(_0x2145a0,_0x29e6da){_0x2145a0=_0x2145a0-0x15b;let _0x231e10=_0x5141f1[_0x2145a0];return _0x231e10;},a9_0x2fe8(_0x1bed6e,_0x3d0b5d);}var __decorate=this&&this[a9_0xc1a833(0x188)]||function(_0x208eba,_0x4c2da2,_0xadaa23,_0x1595af){const _0x5219fb=a9_0xc1a833;var _0xfec395=arguments[_0x5219fb(0x165)],_0x13c6b6=_0xfec395<0x3?_0x4c2da2:_0x1595af===null?_0x1595af=Object[_0x5219fb(0x18b)](_0x4c2da2,_0xadaa23):_0x1595af,_0x520dfe;if(typeof Reflect===_0x5219fb(0x196)&&typeof Reflect['decorate']===_0x5219fb(0x19a))_0x13c6b6=Reflect['decorate'](_0x208eba,_0x4c2da2,_0xadaa23,_0x1595af);else{for(var _0x29e2b8=_0x208eba[_0x5219fb(0x165)]-0x1;_0x29e2b8>=0x0;_0x29e2b8--)if(_0x520dfe=_0x208eba[_0x29e2b8])_0x13c6b6=(_0xfec395<0x3?_0x520dfe(_0x13c6b6):_0xfec395>0x3?_0x520dfe(_0x4c2da2,_0xadaa23,_0x13c6b6):_0x520dfe(_0x4c2da2,_0xadaa23))||_0x13c6b6;}return _0xfec395>0x3&&_0x13c6b6&&Object[_0x5219fb(0x185)](_0x4c2da2,_0xadaa23,_0x13c6b6),_0x13c6b6;},__metadata=this&&this[a9_0xc1a833(0x161)]||function(_0x3f98f6,_0x5d637a){const _0x4fb6af=a9_0xc1a833;if(typeof Reflect===_0x4fb6af(0x196)&&typeof Reflect[_0x4fb6af(0x184)]==='function')return Reflect[_0x4fb6af(0x184)](_0x3f98f6,_0x5d637a);};function a9_0x231e(){const _0x552b1f=['@midwayjs/i18n','length','errors','design:paramtypes','3602694zVAmHS','(((.+)+)+)+$','383868sVArkg','validator','value','NOFIND_SCHEMA','Init','toString','design:type','schema','Provide','apply','getLocaleMapping','YYYY-MM-DD\x20HH:mm:ss','validationOptions','Config','search','参数验证失败','getSchema','Singleton','details','formatLocale','ValidatorService','language','message','messages','PARAMS','assign','metadata','defineProperty','1mJThPJ','ValidatorError','__decorate','8128skUzqP','605311YOstcf','getOwnPropertyDescriptor','key','prototype','getClassExtendedMetadata','type','design:returntype','i18nConfig','615fVYsCd','keys','localeTable','1561874QPrOnZ','object','format','16224750CVZMHr','constructor','function','_flags','../exception/ValidatorError','__esModule','ScopeEnum','2962480lhJbRE','getAvailableLocale','forEach','MidwayI18nServiceSingleton','i18nService','$_terms','error','Inject','__metadata','../interface','init'];a9_0x231e=function(){return _0x552b1f;};return a9_0x231e();}Object['defineProperty'](exports,a9_0xc1a833(0x19d),{'value':!![]}),exports[a9_0xc1a833(0x17e)]=void 0x0;const Joi=require('joi'),i18n_1=require(a9_0xc1a833(0x164)),core_1=require('@midwayjs/core'),interface_1=require(a9_0xc1a833(0x162)),ValidatorError_1=require(a9_0xc1a833(0x19c));let ValidatorService=class ValidatorService{constructor(){const _0x4a41ae=a9_0xc1a833;this[_0x4a41ae(0x181)]={};}async[a9_0xc1a833(0x163)](){const _0x5de63f=a9_0xc1a833,_0xa7f82c=Object[_0x5de63f(0x193)](this[_0x5de63f(0x191)][_0x5de63f(0x194)]);_0xa7f82c[_0x5de63f(0x15b)](_0x28029a=>{const _0x45f6b6=_0x5de63f;this['messages'][(0x0,i18n_1['formatLocale'])(_0x28029a)]=Object['fromEntries'](this['i18nService'][_0x45f6b6(0x174)](_0x28029a,_0x45f6b6(0x16b)));});}[a9_0xc1a833(0x17a)](_0x3c8815){const _0x4898ba=a9_0xc1a833,_0x560ef8=(0x0,core_1[_0x4898ba(0x18e)])(interface_1['RULES_KEY'],_0x3c8815);return _0x560ef8?Joi['object'](_0x560ef8):undefined;}['validator'](_0x492bc9,_0x4e53c1,_0x1a5c68={}){const _0x5169c8=a9_0xc1a833;var _0x52f64e,_0x2c5bfa,_0x31354a,_0x14c9dd,_0x50fa2f,_0x28bc99;const _0x4f2730=Joi['isSchema'](_0x492bc9)?_0x492bc9:this[_0x5169c8(0x17a)](_0x492bc9);if(!_0x4f2730)throw new AnnError(ValidatorError_1['ValidatorError'][_0x5169c8(0x16d)]);_0x1a5c68['validationOptions']=Object[_0x5169c8(0x183)]((_0x52f64e=this['validatorConfig'][_0x5169c8(0x176)])!==null&&_0x52f64e!==void 0x0?_0x52f64e:{},{'messages':this[_0x5169c8(0x181)]},_0x1a5c68['validationOptions']||{}),_0x1a5c68[_0x5169c8(0x176)][_0x5169c8(0x166)]=_0x1a5c68['validationOptions'][_0x5169c8(0x166)]||{},_0x1a5c68[_0x5169c8(0x176)][_0x5169c8(0x166)][_0x5169c8(0x17f)]=(0x0,i18n_1[_0x5169c8(0x17d)])(this[_0x5169c8(0x15d)][_0x5169c8(0x1a0)](_0x1a5c68[_0x5169c8(0x176)][_0x5169c8(0x166)][_0x5169c8(0x17f)]||_0x1a5c68['locale']||this[_0x5169c8(0x191)]['defaultLocale'],_0x5169c8(0x16b)));const _0x55690b=_0x4f2730['validate'](_0x4e53c1,_0x1a5c68[_0x5169c8(0x176)]);if(_0x55690b===null||_0x55690b===void 0x0?void 0x0:_0x55690b[_0x5169c8(0x15f)]){if(_0x55690b[_0x5169c8(0x15f)]instanceof AnnError)throw _0x55690b[_0x5169c8(0x15f)];else{if(_0x55690b['error']instanceof Error)throw new AnnError(ValidatorError_1[_0x5169c8(0x187)]['PARAMS'],{'message':((_0x2c5bfa=_0x55690b['error'])===null||_0x2c5bfa===void 0x0?void 0x0:_0x2c5bfa[_0x5169c8(0x180)])||_0x5169c8(0x179)});else throw new AnnError(ValidatorError_1['ValidatorError'][_0x5169c8(0x182)],{'message':((_0x50fa2f=(_0x14c9dd=(_0x31354a=_0x55690b['error'])===null||_0x31354a===void 0x0?void 0x0:_0x31354a[_0x5169c8(0x17c)])===null||_0x14c9dd===void 0x0?void 0x0:_0x14c9dd[0x0])===null||_0x50fa2f===void 0x0?void 0x0:_0x50fa2f[_0x5169c8(0x180)])||_0x5169c8(0x179)});}}if(_0x55690b===null||_0x55690b===void 0x0?void 0x0:_0x55690b[_0x5169c8(0x16c)]){const _0x3d7d96=(_0x28bc99=_0x4f2730===null||_0x4f2730===void 0x0?void 0x0:_0x4f2730['$_terms'])===null||_0x28bc99===void 0x0?void 0x0:_0x28bc99[_0x5169c8(0x193)],_0x1d908c=function(_0xb90115,_0x381d35){const _0x2ca858=_0x5169c8;var _0x2cbdea,_0x874911,_0x4cd5c9,_0x4336af,_0x4ba796,_0x4fd0b9,_0x394af4,_0x19e080,_0xc955e4,_0x35689c,_0x21de76;for(let _0x4a92b6 in _0xb90115){if(_0x381d35[(_0x2cbdea=_0xb90115[_0x4a92b6])===null||_0x2cbdea===void 0x0?void 0x0:_0x2cbdea[_0x2ca858(0x18c)]]&&((_0x4cd5c9=(_0x874911=_0xb90115[_0x4a92b6])===null||_0x874911===void 0x0?void 0x0:_0x874911[_0x2ca858(0x171)])===null||_0x4cd5c9===void 0x0?void 0x0:_0x4cd5c9[_0x2ca858(0x18f)])){if(((_0x4ba796=(_0x4336af=_0xb90115[_0x4a92b6])===null||_0x4336af===void 0x0?void 0x0:_0x4336af[_0x2ca858(0x171)])===null||_0x4ba796===void 0x0?void 0x0:_0x4ba796[_0x2ca858(0x18f)])=='object')_0x381d35[_0xb90115[_0x4a92b6][_0x2ca858(0x18c)]]=_0x1d908c((_0x394af4=(_0x4fd0b9=_0xb90115[_0x4a92b6])===null||_0x4fd0b9===void 0x0?void 0x0:_0x4fd0b9[_0x2ca858(0x171)][_0x2ca858(0x15e)])===null||_0x394af4===void 0x0?void 0x0:_0x394af4[_0x2ca858(0x193)],_0x381d35[_0xb90115[_0x4a92b6][_0x2ca858(0x18c)]]);else{if(_0xb90115[_0x4a92b6][_0x2ca858(0x171)][_0x2ca858(0x18f)]=='date'&&_0x55690b['value'][(_0x19e080=_0xb90115[_0x4a92b6])===null||_0x19e080===void 0x0?void 0x0:_0x19e080[_0x2ca858(0x18c)]]){const _0x2a9daa=((_0x21de76=(_0x35689c=(_0xc955e4=_0xb90115[_0x4a92b6])===null||_0xc955e4===void 0x0?void 0x0:_0xc955e4[_0x2ca858(0x171)])===null||_0x35689c===void 0x0?void 0x0:_0x35689c[_0x2ca858(0x19b)])===null||_0x21de76===void 0x0?void 0x0:_0x21de76[_0x2ca858(0x197)])||_0x2ca858(0x175);_0x381d35[_0xb90115[_0x4a92b6][_0x2ca858(0x18c)]]=dayjs(_0x55690b['value'][_0xb90115[_0x4a92b6]['key']])[_0x2ca858(0x197)](_0x2a9daa);}}}}return _0x381d35;};return _0x1d908c(_0x3d7d96,_0x55690b['value']);}throw new AnnError(ValidatorError_1[_0x5169c8(0x187)][_0x5169c8(0x182)]);}};exports['ValidatorService']=ValidatorService,__decorate([(0x0,core_1[a9_0xc1a833(0x177)])('i18n'),__metadata(a9_0xc1a833(0x170),Object)],ValidatorService['prototype'],a9_0xc1a833(0x191),void 0x0),__decorate([(0x0,core_1[a9_0xc1a833(0x177)])(a9_0xc1a833(0x16b)),__metadata(a9_0xc1a833(0x170),Object)],ValidatorService[a9_0xc1a833(0x18d)],'validatorConfig',void 0x0),__decorate([(0x0,core_1[a9_0xc1a833(0x160)])(),__metadata(a9_0xc1a833(0x170),i18n_1[a9_0xc1a833(0x15c)])],ValidatorService['prototype'],a9_0xc1a833(0x15d),void 0x0),__decorate([(0x0,core_1[a9_0xc1a833(0x16e)])(),__metadata(a9_0xc1a833(0x170),Function),__metadata(a9_0xc1a833(0x167),[]),__metadata(a9_0xc1a833(0x190),Promise)],ValidatorService['prototype'],a9_0xc1a833(0x163),null),exports[a9_0xc1a833(0x17e)]=ValidatorService=__decorate([(0x0,core_1[a9_0xc1a833(0x172)])('validator'),(0x0,core_1['Scope'])(core_1[a9_0xc1a833(0x19e)][a9_0xc1a833(0x17b)])],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.16",
|
|
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.16",
|
|
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": "a39c1f253f76788d72b00a8f4e616e1cf7e97e56"
|
|
30
30
|
}
|