@anncic-api/validator 3.3.1 → 3.3.3
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/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_0x414e80=a0_0x5348;(function(_0x585d13,_0x171de8){const _0x5cd3dc=a0_0x5348,_0x306d5a=_0x585d13();while(!![]){try{const _0x508cf4=-parseInt(_0x5cd3dc(0x1d3))/0x1*(parseInt(_0x5cd3dc(0x1d7))/0x2)+-parseInt(_0x5cd3dc(0x1c6))/0x3+-parseInt(_0x5cd3dc(0x1c9))/0x4+-parseInt(_0x5cd3dc(0x1ce))/0x5+parseInt(_0x5cd3dc(0x1cb))/0x6+parseInt(_0x5cd3dc(0x1d4))/0x7+-parseInt(_0x5cd3dc(0x1cd))/0x8*(-parseInt(_0x5cd3dc(0x1c7))/0x9);if(_0x508cf4===_0x171de8)break;else _0x306d5a['push'](_0x306d5a['shift']());}catch(_0x223391){_0x306d5a['push'](_0x306d5a['shift']());}}}(a0_0x2483,0x4e1b4));const a0_0x1c3b4b=(function(){let _0x1a3701=!![];return function(_0x1ab73c,_0x3c179d){const _0x5bb38e=_0x1a3701?function(){const _0x399646=a0_0x5348;if(_0x3c179d){const _0x2220a2=_0x3c179d[_0x399646(0x1d5)](_0x1ab73c,arguments);return _0x3c179d=null,_0x2220a2;}}:function(){};return _0x1a3701=![],_0x5bb38e;};}()),a0_0x27a2f7=a0_0x1c3b4b(this,function(){const _0x26a89a=a0_0x5348;return a0_0x27a2f7[_0x26a89a(0x1cf)]()[_0x26a89a(0x1d2)](_0x26a89a(0x1ca))['toString']()[_0x26a89a(0x1d1)](a0_0x27a2f7)[_0x26a89a(0x1d2)](_0x26a89a(0x1ca));});function a0_0x5348(_0x52eda0,_0x296274){const _0x5193b9=a0_0x2483();return a0_0x5348=function(_0x27a2f7,_0x1c3b4b){_0x27a2f7=_0x27a2f7-0x1c6;let _0x248309=_0x5193b9[_0x27a2f7];return _0x248309;},a0_0x5348(_0x52eda0,_0x296274);}function a0_0x2483(){const _0x5affe0=['../../locales/zh_CN.json','572100IEmSAB','(((.+)+)+)+$','348180kufRSY','ValidatorError','1016CBnQGc','3005295rZxvYE','toString','default','constructor','search','2lNklvt','616259zNOHqT','apply','../exception/ValidatorError','454838nvZFVN','__esModule','../../locales/en_US.json','1549800uhpgWh','133893PSulWe'];a0_0x2483=function(){return _0x5affe0;};return a0_0x2483();}a0_0x27a2f7();'use strict';Object['defineProperty'](exports,a0_0x414e80(0x1d8),{'value':!![]});const ValidatorError_1=require(a0_0x414e80(0x1d6));exports[a0_0x414e80(0x1d0)]={'validator':{'errorStatus':ValidatorError_1[a0_0x414e80(0x1cc)]['PARAMS'],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x414e80(0x1d9))},'zh_CN':{'validator':require(a0_0x414e80(0x1c8))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a1_0x43b6(_0x4cb942,_0x2e26d1){const _0xc5a2d5=a1_0xa3ba();return a1_0x43b6=function(_0x4d2248,_0x6bd5f0){_0x4d2248=_0x4d2248-0x1a2;let _0xa3ba33=_0xc5a2d5[_0x4d2248];return _0xa3ba33;},a1_0x43b6(_0x4cb942,_0x2e26d1);}const a1_0x2631d6=a1_0x43b6;(function(_0x2a171f,_0x36dc4c){const _0x48b46d=a1_0x43b6,_0x36b6ad=_0x2a171f();while(!![]){try{const _0x53a948=-parseInt(_0x48b46d(0x1a8))/0x1+parseInt(_0x48b46d(0x1d9))/0x2+parseInt(_0x48b46d(0x1d7))/0x3+parseInt(_0x48b46d(0x1b0))/0x4*(parseInt(_0x48b46d(0x1a2))/0x5)+parseInt(_0x48b46d(0x1c2))/0x6+-parseInt(_0x48b46d(0x1ca))/0x7*(-parseInt(_0x48b46d(0x1b5))/0x8)+-parseInt(_0x48b46d(0x1c4))/0x9*(parseInt(_0x48b46d(0x1d8))/0xa);if(_0x53a948===_0x36dc4c)break;else _0x36b6ad['push'](_0x36b6ad['shift']());}catch(_0x4aafab){_0x36b6ad['push'](_0x36b6ad['shift']());}}}(a1_0xa3ba,0x6114b));const a1_0x6bd5f0=(function(){let _0x3e2b91=!![];return function(_0x530b58,_0x34d721){const _0x5913f9=_0x3e2b91?function(){if(_0x34d721){const _0x351273=_0x34d721['apply'](_0x530b58,arguments);return _0x34d721=null,_0x351273;}}:function(){};return _0x3e2b91=![],_0x5913f9;};}()),a1_0x4d2248=a1_0x6bd5f0(this,function(){const _0x33af0a=a1_0x43b6;return a1_0x4d2248['toString']()['search'](_0x33af0a(0x1cb))['toString']()[_0x33af0a(0x1c0)](a1_0x4d2248)['search'](_0x33af0a(0x1cb));});a1_0x4d2248();'use strict';var __decorate=this&&this['__decorate']||function(_0x1a3106,_0x3c8a41,_0x48522f,_0x3490e3){const _0x11ed52=a1_0x43b6;var _0x41a25f=arguments['length'],_0xd85f25=_0x41a25f<0x3?_0x3c8a41:_0x3490e3===null?_0x3490e3=Object[_0x11ed52(0x1b6)](_0x3c8a41,_0x48522f):_0x3490e3,_0x405b6f;if(typeof Reflect===_0x11ed52(0x1aa)&&typeof Reflect[_0x11ed52(0x1a4)]===_0x11ed52(0x1b3))_0xd85f25=Reflect[_0x11ed52(0x1a4)](_0x1a3106,_0x3c8a41,_0x48522f,_0x3490e3);else{for(var _0x42fb28=_0x1a3106[_0x11ed52(0x1d5)]-0x1;_0x42fb28>=0x0;_0x42fb28--)if(_0x405b6f=_0x1a3106[_0x42fb28])_0xd85f25=(_0x41a25f<0x3?_0x405b6f(_0xd85f25):_0x41a25f>0x3?_0x405b6f(_0x3c8a41,_0x48522f,_0xd85f25):_0x405b6f(_0x3c8a41,_0x48522f))||_0xd85f25;}return _0x41a25f>0x3&&_0xd85f25&&Object[_0x11ed52(0x1bf)](_0x3c8a41,_0x48522f,_0xd85f25),_0xd85f25;},__metadata=this&&this[a1_0x2631d6(0x1b9)]||function(_0x2ff057,_0x2afff3){const _0xd25114=a1_0x2631d6;if(typeof Reflect===_0xd25114(0x1aa)&&typeof Reflect[_0xd25114(0x1ba)]===_0xd25114(0x1b3))return Reflect[_0xd25114(0x1ba)](_0x2ff057,_0x2afff3);};Object[a1_0x2631d6(0x1bf)](exports,a1_0x2631d6(0x1c5),{'value':!![]}),exports[a1_0x2631d6(0x1b8)]=void 0x0;function a1_0xa3ba(){const _0x123bd3=['req','methodArgs','method','args','param','getMethodParamTypes','anncic-api:validator','@anncic-api/core','body','length','propertyName','247302PjzRBK','13846030BzBsWl','845572qKtuBE','splice','14585OmwlkS','target','decorate','params','Inject','onReady','289620nLYsPm','query','object','getSchema','getAttr','request','find','methodName','884FiYTsX','@midwayjs/core','ValidatorService','function','locale','2662592SLaaMU','getOwnPropertyDescriptor','prototype','CustomConfiguration','__metadata','metadata','res','./interface','getClassMetadata','MidwayDecoratorService','defineProperty','constructor','design:type','3534990rSkBmT','decorator','9RQQxqc','__esModule','assign','./service/ValidatorService','undefined','registerMethodHandler','7sALMNz','(((.+)+)+)+$'];a1_0xa3ba=function(){return _0x123bd3;};return a1_0xa3ba();}const i18n_1=require('@midwayjs/i18n'),core_1=require(a1_0x2631d6(0x1b1)),core_2=require(a1_0x2631d6(0x1b1)),interface_1=require(a1_0x2631d6(0x1bc)),ValidatorService_1=require(a1_0x2631d6(0x1c7)),i18n=require('@midwayjs/i18n'),anncic=require(a1_0x2631d6(0x1d3)),ConfigDefault=require('./config/config.default');let CustomConfiguration=exports[a1_0x2631d6(0x1b8)]=class CustomConfiguration{async[a1_0x2631d6(0x1a7)](){const _0xf91f78=a1_0x2631d6;this[_0xf91f78(0x1c3)][_0xf91f78(0x1c9)](interface_1['VALIDATOR_KEY'],_0x173b69=>{const _0x5c94cb=_0xf91f78,_0x18f6af=_0x173b69[_0x5c94cb(0x1ba)],_0xc9d9bd=(0x0,core_2[_0x5c94cb(0x1d1)])(_0x173b69[_0x5c94cb(0x1a3)],_0x173b69[_0x5c94cb(0x1d6)]);return{'before':_0x373764=>{const _0x5202de=_0x5c94cb;var _0x2075d0,_0x6e7e0b,_0x440c8f,_0x4f08ea,_0x28641b,_0x46580c,_0x1625b5,_0x1e86de,_0x5b4e45,_0x3c1f87,_0x27f268,_0x262bf7,_0x587c37;const _0x2cb795=_0x373764[_0x5202de(0x1a3)][core_1['REQUEST_OBJ_CTX_KEY']],_0x2dc997=Object[_0x5202de(0x1c6)]({},((_0x2075d0=_0x2cb795===null||_0x2cb795===void 0x0?void 0x0:_0x2cb795[_0x5202de(0x1ad)])===null||_0x2075d0===void 0x0?void 0x0:_0x2075d0[_0x5202de(0x1a9)])||{},((_0x6e7e0b=_0x2cb795===null||_0x2cb795===void 0x0?void 0x0:_0x2cb795[_0x5202de(0x1ad)])===null||_0x6e7e0b===void 0x0?void 0x0:_0x6e7e0b[_0x5202de(0x1d4)])||{}),_0x502aa1=((0x0,core_2[_0x5202de(0x1bd)])(interface_1['VALIDATOR_KEY'],_0x373764[_0x5202de(0x1a3)])||[])[_0x5202de(0x1ae)](_0x35cb0d=>_0x35cb0d[_0x5202de(0x1ce)]==_0x373764[_0x5202de(0x1af)]);!(_0x18f6af===null||_0x18f6af===void 0x0?void 0x0:_0x18f6af[_0x5202de(0x1b4)])&&_0x2cb795&&_0x2cb795[_0x5202de(0x1ac)]&&(_0x18f6af[_0x5202de(0x1b4)]=_0x2cb795['getAttr'](i18n_1['I18N_ATTR_KEY']));for(let _0x14284b=0x0;_0x14284b<_0xc9d9bd[_0x5202de(0x1d5)];_0x14284b++){const _0x52e809=_0xc9d9bd[_0x14284b],_0x5be177=this[_0x5202de(0x1b2)][_0x5202de(0x1ab)](_0x52e809);if(_0x5be177){if(typeof _0x373764[_0x5202de(0x1cf)][_0x14284b]==_0x5202de(0x1c8)||((_0x440c8f=_0x373764['args'][_0x14284b])===null||_0x440c8f===void 0x0?void 0x0:_0x440c8f[_0x5202de(0x1ad)])&&((_0x4f08ea=_0x373764[_0x5202de(0x1cf)][_0x14284b])===null||_0x4f08ea===void 0x0?void 0x0:_0x4f08ea[_0x5202de(0x1bb)])&&((_0x28641b=_0x373764[_0x5202de(0x1cf)][_0x14284b])===null||_0x28641b===void 0x0?void 0x0:_0x28641b[_0x5202de(0x1cc)]))_0x373764[_0x5202de(0x1cf)][_0x14284b]=_0x2dc997;else((_0x46580c=_0x373764['args'][_0x14284b])===null||_0x46580c===void 0x0?void 0x0:_0x46580c['name'])=='bound\x20dispatch'&&_0x373764[_0x5202de(0x1cf)][_0x5202de(0x1da)](_0x14284b,0x0,_0x2dc997);const _0x1f4104=this[_0x5202de(0x1b2)]['validator'](_0x5be177,_0x373764[_0x5202de(0x1cf)][_0x14284b],_0x18f6af);_0x1f4104&&(_0x373764[_0x5202de(0x1cf)][_0x14284b]=_0x1f4104);}else{if((_0x502aa1===null||_0x502aa1===void 0x0?void 0x0:_0x502aa1[_0x5202de(0x1cd)][_0x14284b])&&((_0x1625b5=_0x373764['args'][_0x14284b])===null||_0x1625b5===void 0x0?void 0x0:_0x1625b5[_0x5202de(0x1a5)])&&typeof _0x373764[_0x5202de(0x1cf)][_0x14284b][_0x5202de(0x1d0)]==_0x5202de(0x1b3)&&((_0x1e86de=_0x2cb795===null||_0x2cb795===void 0x0?void 0x0:_0x2cb795[_0x5202de(0x1a5)])===null||_0x1e86de===void 0x0?void 0x0:_0x1e86de[_0x502aa1[_0x5202de(0x1cd)][_0x14284b]]))_0x373764[_0x5202de(0x1cf)][_0x14284b]=_0x52e809((_0x5b4e45=_0x2cb795===null||_0x2cb795===void 0x0?void 0x0:_0x2cb795[_0x5202de(0x1a5)])===null||_0x5b4e45===void 0x0?void 0x0:_0x5b4e45[_0x502aa1[_0x5202de(0x1cd)][_0x14284b]]);else(_0x502aa1===null||_0x502aa1===void 0x0?void 0x0:_0x502aa1['methodArgs'][_0x14284b])&&((_0x27f268=(_0x3c1f87=_0x373764['args'][_0x14284b])===null||_0x3c1f87===void 0x0?void 0x0:_0x3c1f87['params'])===null||_0x27f268===void 0x0?void 0x0:_0x27f268[_0x502aa1['methodArgs'][_0x14284b]])&&(_0x373764[_0x5202de(0x1cf)][_0x14284b]=(_0x587c37=(_0x262bf7=_0x373764[_0x5202de(0x1cf)][_0x14284b])===null||_0x262bf7===void 0x0?void 0x0:_0x262bf7[_0x5202de(0x1a5)])===null||_0x587c37===void 0x0?void 0x0:_0x587c37[_0x502aa1[_0x5202de(0x1cd)][_0x14284b]]);}}},'afterThrow':(_0x3a28f5,_0x422f68)=>{throw _0x422f68;}};});}};__decorate([(0x0,core_2[a1_0x2631d6(0x1a6)])(),__metadata(a1_0x2631d6(0x1c1),core_1[a1_0x2631d6(0x1be)])],CustomConfiguration[a1_0x2631d6(0x1b7)],'decorator',void 0x0),__decorate([(0x0,core_2['Inject'])(),__metadata(a1_0x2631d6(0x1c1),ValidatorService_1[a1_0x2631d6(0x1b2)])],CustomConfiguration[a1_0x2631d6(0x1b7)],a1_0x2631d6(0x1b2),void 0x0),exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_2['Configuration'])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x2631d6(0x1d2),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x49b7(_0x3011ff,_0x3a5ac6){const _0x23c30f=a2_0x2da6();return a2_0x49b7=function(_0x32f186,_0x4325ee){_0x32f186=_0x32f186-0xac;let _0x2da65d=_0x23c30f[_0x32f186];return _0x2da65d;},a2_0x49b7(_0x3011ff,_0x3a5ac6);}const a2_0x5233eb=a2_0x49b7;(function(_0x14489a,_0x4f925e){const _0x6227c4=a2_0x49b7,_0x44ac42=_0x14489a();while(!![]){try{const _0x21091f=-parseInt(_0x6227c4(0xb2))/0x1*(-parseInt(_0x6227c4(0xb5))/0x2)+parseInt(_0x6227c4(0xc6))/0x3+parseInt(_0x6227c4(0xb4))/0x4*(-parseInt(_0x6227c4(0xad))/0x5)+-parseInt(_0x6227c4(0xbd))/0x6+parseInt(_0x6227c4(0xd0))/0x7*(parseInt(_0x6227c4(0xb3))/0x8)+-parseInt(_0x6227c4(0xc1))/0x9*(parseInt(_0x6227c4(0xb1))/0xa)+parseInt(_0x6227c4(0xbe))/0xb*(parseInt(_0x6227c4(0xcf))/0xc);if(_0x21091f===_0x4f925e)break;else _0x44ac42['push'](_0x44ac42['shift']());}catch(_0x594cd7){_0x44ac42['push'](_0x44ac42['shift']());}}}(a2_0x2da6,0xbd1ec));const a2_0x4325ee=(function(){let _0x1958ff=!![];return function(_0x83f0e7,_0xc81a84){const _0x91d59c=_0x1958ff?function(){const _0x10a025=a2_0x49b7;if(_0xc81a84){const _0x29fbe6=_0xc81a84[_0x10a025(0xc7)](_0x83f0e7,arguments);return _0xc81a84=null,_0x29fbe6;}}:function(){};return _0x1958ff=![],_0x91d59c;};}()),a2_0x32f186=a2_0x4325ee(this,function(){const _0x37fcd6=a2_0x49b7;return a2_0x32f186[_0x37fcd6(0xcb)]()[_0x37fcd6(0xca)](_0x37fcd6(0xb6))[_0x37fcd6(0xcb)]()[_0x37fcd6(0xae)](a2_0x32f186)['search'](_0x37fcd6(0xb6));});a2_0x32f186();'use strict';Object[a2_0x5233eb(0xcc)](exports,a2_0x5233eb(0xc5),{'value':!![]}),exports[a2_0x5233eb(0xce)]=exports[a2_0x5233eb(0xac)]=void 0x0;const joi=require(a2_0x5233eb(0xb8)),date_1=require(a2_0x5233eb(0xbb)),core_1=require(a2_0x5233eb(0xd1)),interface_1=require(a2_0x5233eb(0xba));exports[a2_0x5233eb(0xac)]=joi[a2_0x5233eb(0xc2)](date_1[a2_0x5233eb(0xc3)]);function a2_0x2da6(){const _0x564b73=['object','Rule','24BIKzKc','6391JOsXcD','@midwayjs/core','RuleType','5cgkmTx','constructor','RULES_KEY','Array','20puNzNQ','3097oIHwrS','1424yuVRcP','3546184uPdQqH','436TuUwdW','(((.+)+)+)+$','isSchema','joi','label','../interface','@joi/date','getClassMetadata','1565910ATjoRD','5413914KAGbtf','function','saveClassMetadata','3159864QUKdOs','extend','default','name','__esModule','2407053gUIqoo','apply','keys','getPropertyType','search','toString','defineProperty'];a2_0x2da6=function(){return _0x564b73;};return a2_0x2da6();}function Rule(_0x171bcb,_0x2db942,_0x5e60f8=''){return(_0x5220a2,_0x1c4cff)=>{const _0x1e9e1c=a2_0x49b7;var _0x5b1449;if(_0x1c4cff)!joi['isSchema'](_0x2db942)&&(_0x2db942===null||_0x2db942===void 0x0?void 0x0:_0x2db942['name'])&&(_0x2db942=joi[_0x1e9e1c(0xcd)]((0x0,core_1[_0x1e9e1c(0xbc)])(interface_1[_0x1e9e1c(0xaf)],_0x2db942))['meta']({'id':_0x2db942[_0x1e9e1c(0xc4)]}),(0x0,core_1[_0x1e9e1c(0xc9)])(_0x5220a2,_0x1c4cff)[_0x1e9e1c(0xc4)]===_0x1e9e1c(0xb0)&&(_0x2db942=joi['array']()['items'](_0x2db942))),joi[_0x1e9e1c(0xb7)](_0x2db942)&&(_0x171bcb&&typeof(_0x2db942===null||_0x2db942===void 0x0?void 0x0:_0x2db942[_0x1e9e1c(0xb9)])=='function'&&(_0x2db942=_0x2db942[_0x1e9e1c(0xb9)](_0x171bcb)),_0x5e60f8&&typeof(_0x2db942===null||_0x2db942===void 0x0?void 0x0:_0x2db942['description'])==_0x1e9e1c(0xbf)&&(_0x2db942=_0x2db942['description'](_0x5e60f8)),(0x0,core_1['attachClassMetadata'])(interface_1[_0x1e9e1c(0xaf)],_0x2db942,_0x5220a2,_0x1c4cff));else{const _0x5d516a=(0x0,core_1[_0x1e9e1c(0xbc)])(interface_1[_0x1e9e1c(0xaf)],_0x2db942);if(_0x5d516a){let _0x2205c8=(_0x5b1449=(0x0,core_1[_0x1e9e1c(0xbc)])(interface_1['RULES_KEY'],_0x5220a2))!==null&&_0x5b1449!==void 0x0?_0x5b1449:{};Object[_0x1e9e1c(0xc8)](_0x5d516a)['map'](_0x8921f9=>{!_0x2205c8[_0x8921f9]&&(_0x2205c8[_0x8921f9]=_0x5d516a[_0x8921f9]);}),(0x0,core_1[_0x1e9e1c(0xc0)])(interface_1[_0x1e9e1c(0xaf)],_0x2205c8,_0x5220a2);}}};}exports[a2_0x5233eb(0xce)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x42c4e5=a3_0x2936;function a3_0x2936(_0x2c8f9a,_0x4c8d5a){const _0x5d702e=a3_0x1fc8();return a3_0x2936=function(_0x38b6f2,_0x47c401){_0x38b6f2=_0x38b6f2-0xbf;let _0x1fc808=_0x5d702e[_0x38b6f2];return _0x1fc808;},a3_0x2936(_0x2c8f9a,_0x4c8d5a);}(function(_0x6d4668,_0x4300d9){const _0x357e52=a3_0x2936,_0x847539=_0x6d4668();while(!![]){try{const _0x516d1b=parseInt(_0x357e52(0xc3))/0x1+-parseInt(_0x357e52(0xce))/0x2+-parseInt(_0x357e52(0xd8))/0x3+parseInt(_0x357e52(0xc9))/0x4*(-parseInt(_0x357e52(0xd5))/0x5)+-parseInt(_0x357e52(0xc8))/0x6+parseInt(_0x357e52(0xd6))/0x7*(parseInt(_0x357e52(0xc6))/0x8)+-parseInt(_0x357e52(0xc0))/0x9*(-parseInt(_0x357e52(0xd3))/0xa);if(_0x516d1b===_0x4300d9)break;else _0x847539['push'](_0x847539['shift']());}catch(_0x5cce2e){_0x847539['push'](_0x847539['shift']());}}}(a3_0x1fc8,0xa39f0));const a3_0x47c401=(function(){let _0x352887=!![];return function(_0x52c875,_0x30a3a1){const _0xe163b0=_0x352887?function(){const _0x58a79c=a3_0x2936;if(_0x30a3a1){const _0x3bd3fa=_0x30a3a1[_0x58a79c(0xcf)](_0x52c875,arguments);return _0x30a3a1=null,_0x3bd3fa;}}:function(){};return _0x352887=![],_0xe163b0;};}()),a3_0x38b6f2=a3_0x47c401(this,function(){const _0x5ed81e=a3_0x2936;return a3_0x38b6f2[_0x5ed81e(0xd2)]()['search'](_0x5ed81e(0xd0))[_0x5ed81e(0xd2)]()[_0x5ed81e(0xd1)](a3_0x38b6f2)['search'](_0x5ed81e(0xd0));});a3_0x38b6f2();function a3_0x1fc8(){const _0x441e2b=['prototype','1822448htJuTu','apply','(((.+)+)+)+$','constructor','toString','15415430hNMvto','function','284380etWyFq','7OzLwSd','attachClassMetadata','579942VOxYxZ','@midwayjs/core','18mulwzv','indexOf','createCustomMethodDecorator','4129BHkMsd','VALIDATOR_KEY','Validator','7752896ppQcLX','getFuncArgs','7205718KhIWAp','76FnlEmO','replace','../interface','defineProperty'];a3_0x1fc8=function(){return _0x441e2b;};return a3_0x1fc8();}'use strict';Object[a3_0x42c4e5(0xcc)](exports,'__esModule',{'value':!![]}),exports['getFuncArgs']=exports['Validator']=void 0x0;const core_1=require(a3_0x42c4e5(0xbf)),interface_1=require(a3_0x42c4e5(0xcb));function Validator(_0x562479={}){return(_0x900ebf,_0x84b8,_0x40c544)=>{const _0x40c622=a3_0x2936,_0x4d51ad=getFuncArgs(_0x900ebf[_0x84b8]);(0x0,core_1[_0x40c622(0xd7)])(interface_1[_0x40c622(0xc4)],{'method':_0x84b8,'methodArgs':_0x4d51ad},_0x900ebf),(0x0,core_1[_0x40c622(0xc2)])(interface_1[_0x40c622(0xc4)],_0x562479)(_0x900ebf,_0x84b8,_0x40c544);};}exports[a3_0x42c4e5(0xc5)]=Validator;function getFuncArgs(_0x302ca5){const _0x1dfedd=a3_0x42c4e5;if(typeof _0x302ca5==_0x1dfedd(0xd4)){const _0x5576d9=/=>.*$/mg,_0x54a6b4=/=[^,)]+/mg,_0x465517=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x52376f=(_0x302ca5[_0x1dfedd(0xcd)]?_0x302ca5[_0x1dfedd(0xcd)][_0x1dfedd(0xd1)][_0x1dfedd(0xd2)]():_0x302ca5[_0x1dfedd(0xd2)]())[_0x1dfedd(0xca)](_0x465517,'')[_0x1dfedd(0xca)](_0x5576d9,'')[_0x1dfedd(0xca)](_0x54a6b4,''),_0x5bb4b9=_0x52376f['slice'](_0x52376f['indexOf']('(')+0x1,_0x52376f[_0x1dfedd(0xc1)](')'))['match'](/([^\s,]+)/g)||[];return _0x5bb4b9;}}exports[a3_0x42c4e5(0xc7)]=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x3c0f62=a4_0x3bbc;(function(_0x4c9adb,_0x270b08){var _0x51f578=a4_0x3bbc,_0x4d1162=_0x4c9adb();while(!![]){try{var _0x1c479f=-parseInt(_0x51f578(0x1a2))/0x1*(-parseInt(_0x51f578(0x192))/0x2)+parseInt(_0x51f578(0x198))/0x3+-parseInt(_0x51f578(0x197))/0x4+parseInt(_0x51f578(0x18b))/0x5*(parseInt(_0x51f578(0x19f))/0x6)+parseInt(_0x51f578(0x18f))/0x7*(parseInt(_0x51f578(0x19d))/0x8)+parseInt(_0x51f578(0x196))/0x9*(-parseInt(_0x51f578(0x187))/0xa)+-parseInt(_0x51f578(0x189))/0xb*(-parseInt(_0x51f578(0x18d))/0xc);if(_0x1c479f===_0x270b08)break;else _0x4d1162['push'](_0x4d1162['shift']());}catch(_0xab51a6){_0x4d1162['push'](_0x4d1162['shift']());}}}(a4_0x80e3,0x8936c));var a4_0x5f3020=(function(){var _0x11108f=!![];return function(_0x1f63f1,_0x234d38){var _0x42019e=_0x11108f?function(){if(_0x234d38){var _0x4b808f=_0x234d38['apply'](_0x1f63f1,arguments);return _0x234d38=null,_0x4b808f;}}:function(){};return _0x11108f=![],_0x42019e;};}()),a4_0x2377b1=a4_0x5f3020(this,function(){var _0x10ca66=a4_0x3bbc;return a4_0x2377b1[_0x10ca66(0x18c)]()[_0x10ca66(0x191)](_0x10ca66(0x193))[_0x10ca66(0x18c)]()[_0x10ca66(0x185)](a4_0x2377b1)[_0x10ca66(0x191)](_0x10ca66(0x193));});function a4_0x3bbc(_0x264c28,_0x37efc4){var _0x12d19f=a4_0x80e3();return a4_0x3bbc=function(_0x2377b1,_0x5f3020){_0x2377b1=_0x2377b1-0x183;var _0x80e3ff=_0x12d19f[_0x2377b1];return _0x80e3ff;},a4_0x3bbc(_0x264c28,_0x37efc4);}a4_0x2377b1();'use strict';var __decorate=this&&this['__decorate']||function(_0x12bf86,_0x1fb671,_0x3fdf1d,_0x35c13b){var _0xe704b3=a4_0x3bbc,_0x3d53f8=arguments[_0xe704b3(0x183)],_0x1d537e=_0x3d53f8<0x3?_0x1fb671:_0x35c13b===null?_0x35c13b=Object[_0xe704b3(0x1a1)](_0x1fb671,_0x3fdf1d):_0x35c13b,_0x4d928d;if(typeof Reflect===_0xe704b3(0x19b)&&typeof Reflect[_0xe704b3(0x18e)]===_0xe704b3(0x188))_0x1d537e=Reflect[_0xe704b3(0x18e)](_0x12bf86,_0x1fb671,_0x3fdf1d,_0x35c13b);else{for(var _0x9446bb=_0x12bf86[_0xe704b3(0x183)]-0x1;_0x9446bb>=0x0;_0x9446bb--)if(_0x4d928d=_0x12bf86[_0x9446bb])_0x1d537e=(_0x3d53f8<0x3?_0x4d928d(_0x1d537e):_0x3d53f8>0x3?_0x4d928d(_0x1fb671,_0x3fdf1d,_0x1d537e):_0x4d928d(_0x1fb671,_0x3fdf1d))||_0x1d537e;}return _0x3d53f8>0x3&&_0x1d537e&&Object[_0xe704b3(0x184)](_0x1fb671,_0x3fdf1d,_0x1d537e),_0x1d537e;},__metadata=this&&this[a4_0x3c0f62(0x199)]||function(_0x15ebd0,_0xa16ec6){var _0xf0f1c8=a4_0x3c0f62;if(typeof Reflect===_0xf0f1c8(0x19b)&&typeof Reflect['metadata']===_0xf0f1c8(0x188))return Reflect[_0xf0f1c8(0x190)](_0x15ebd0,_0xa16ec6);};Object[a4_0x3c0f62(0x184)](exports,a4_0x3c0f62(0x19e),{'value':!![]}),exports[a4_0x3c0f62(0x18a)]=void 0x0;const core_1=require(a4_0x3c0f62(0x19c));class ValidatorError extends AnnError{}exports[a4_0x3c0f62(0x18a)]=ValidatorError,ValidatorError[a4_0x3c0f62(0x19a)]=0x18c1e,ValidatorError[a4_0x3c0f62(0x186)]=0x18c1c,__decorate([(0x0,core_1[a4_0x3c0f62(0x194)])('参数验证失败'),__metadata(a4_0x3c0f62(0x195),Object)],ValidatorError,a4_0x3c0f62(0x19a),void 0x0),__decorate([(0x0,core_1['AnnErrorMsg'])(a4_0x3c0f62(0x1a0)),__metadata('design:type',Object)],ValidatorError,a4_0x3c0f62(0x186),void 0x0);function a4_0x80e3(){var _0x50c060=['design:type','9GfTyQF','2162736gZFSQL','932706PtPiFs','__metadata','PARAMS','object','@anncic-api/core','8072iHHpav','__esModule','1207674HNXJeP','参数验证失败','getOwnPropertyDescriptor','7NKQYIX','length','defineProperty','constructor','NOFIND_SCHEMA','4925850WJhCTU','function','10681YhaCAz','ValidatorError','5PODDqi','toString','2952omfGpr','decorate','3829YHEDwE','metadata','search','83522pKrwpM','(((.+)+)+)+$','AnnErrorMsg'];a4_0x80e3=function(){return _0x50c060;};return a4_0x80e3();}
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a5_0x52a7d2=a5_0x26c6;(function(_0x44dbb1,_0x5171dd){const _0x128f46=a5_0x26c6,_0x47c6b8=_0x44dbb1();while(!![]){try{const _0x32e48a=-parseInt(_0x128f46(0x198))/0x1+parseInt(_0x128f46(0x19e))/0x2+parseInt(_0x128f46(0x19c))/0x3+-parseInt(_0x128f46(0x193))/0x4+parseInt(_0x128f46(0x19b))/0x5*(-parseInt(_0x128f46(0x19a))/0x6)+-parseInt(_0x128f46(0x1a0))/0x7*(-parseInt(_0x128f46(0x199))/0x8)+parseInt(_0x128f46(0x1a3))/0x9;if(_0x32e48a===_0x5171dd)break;else _0x47c6b8['push'](_0x47c6b8['shift']());}catch(_0x1eb358){_0x47c6b8['push'](_0x47c6b8['shift']());}}}(a5_0x23fa,0x95747));const a5_0x38f376=(function(){let _0x330400=!![];return function(_0x4bfebf,_0x320fe3){const _0x2a3b01=_0x330400?function(){const _0x136390=a5_0x26c6;if(_0x320fe3){const _0x3dff07=_0x320fe3[_0x136390(0x197)](_0x4bfebf,arguments);return _0x320fe3=null,_0x3dff07;}}:function(){};return _0x330400=![],_0x2a3b01;};}()),a5_0x79c646=a5_0x38f376(this,function(){const _0x559fde=a5_0x26c6;return a5_0x79c646[_0x559fde(0x19d)]()[_0x559fde(0x192)]('(((.+)+)+)+$')[_0x559fde(0x19d)]()[_0x559fde(0x194)](a5_0x79c646)['search']('(((.+)+)+)+$');});function a5_0x26c6(_0x566449,_0x28f150){const _0x28c9b2=a5_0x23fa();return a5_0x26c6=function(_0x79c646,_0x38f376){_0x79c646=_0x79c646-0x18f;let _0x23fa1b=_0x28c9b2[_0x79c646];return _0x23fa1b;},a5_0x26c6(_0x566449,_0x28f150);}a5_0x79c646();'use strict';Object['defineProperty'](exports,a5_0x52a7d2(0x1a5),{'value':!![]}),exports[a5_0x52a7d2(0x1a2)]=exports['PickDto']=void 0x0;const core_1=require(a5_0x52a7d2(0x196)),interface_1=require(a5_0x52a7d2(0x191));function PickDto(_0x140d71,_0x21a368){const _0x3e6176=a5_0x52a7d2,_0x2190dc=function(){};_0x2190dc[_0x3e6176(0x18f)]=_0x140d71[_0x3e6176(0x18f)];const _0x2826bd=(0x0,core_1[_0x3e6176(0x19f)])(interface_1[_0x3e6176(0x190)],_0x140d71),_0x376a01={};for(const _0x2aa10a of _0x21a368){_0x2826bd[_0x2aa10a]&&(_0x376a01[_0x2aa10a]=_0x2826bd[_0x2aa10a]);}return(0x0,core_1[_0x3e6176(0x1a4)])(interface_1[_0x3e6176(0x190)],_0x376a01,_0x2190dc),_0x2190dc;}exports[a5_0x52a7d2(0x195)]=PickDto;function a5_0x23fa(){const _0x2045da=['PickDto','@midwayjs/core','apply','1025422ENmegR','214280AiPXEI','515574SrQdYy','50zjyZgM','918396dsOFET','toString','1986596bMruVW','getClassExtendedMetadata','91dhVpdb','assign','OmitDto','11000052jiUvdc','saveClassMetadata','__esModule','prototype','RULES_KEY','../interface','search','1491936AtWapD','constructor'];a5_0x23fa=function(){return _0x2045da;};return a5_0x23fa();}function OmitDto(_0x1a0cb7,_0x23d43){const _0x4f656f=a5_0x52a7d2,_0x5e2fbe=function(){};_0x5e2fbe[_0x4f656f(0x18f)]=_0x1a0cb7[_0x4f656f(0x18f)];const _0x3ca5bd=(0x0,core_1[_0x4f656f(0x19f)])(interface_1['RULES_KEY'],_0x1a0cb7),_0x275465=Object[_0x4f656f(0x1a1)]({},_0x3ca5bd);for(const _0x416c16 of _0x23d43){delete _0x275465[_0x416c16];}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x4f656f(0x190)],_0x275465,_0x5e2fbe),_0x5e2fbe;}exports[a5_0x52a7d2(0x1a2)]=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x39146b=a6_0x5f40;(function(_0xe557a7,_0x86aed5){var _0x4c5a80=a6_0x5f40,_0x2ed932=_0xe557a7();while(!![]){try{var _0x539cc1=-parseInt(_0x4c5a80(0xef))/0x1*(parseInt(_0x4c5a80(0xea))/0x2)+parseInt(_0x4c5a80(0xeb))/0x3+-parseInt(_0x4c5a80(0x103))/0x4+-parseInt(_0x4c5a80(0x105))/0x5*(parseInt(_0x4c5a80(0xf3))/0x6)+parseInt(_0x4c5a80(0xf6))/0x7+-parseInt(_0x4c5a80(0xec))/0x8*(parseInt(_0x4c5a80(0xf8))/0x9)+parseInt(_0x4c5a80(0xe9))/0xa;if(_0x539cc1===_0x86aed5)break;else _0x2ed932['push'](_0x2ed932['shift']());}catch(_0x3c694d){_0x2ed932['push'](_0x2ed932['shift']());}}}(a6_0x1c6a,0x23f43));var a6_0x52e3ab=(function(){var _0x21b368=!![];return function(_0x4f5d4e,_0x475036){var _0x5e9a4f=_0x21b368?function(){var _0xa88265=a6_0x5f40;if(_0x475036){var _0x536c85=_0x475036[_0xa88265(0xff)](_0x4f5d4e,arguments);return _0x475036=null,_0x536c85;}}:function(){};return _0x21b368=![],_0x5e9a4f;};}()),a6_0x26f5ad=a6_0x52e3ab(this,function(){var _0xeffb50=a6_0x5f40;return a6_0x26f5ad[_0xeffb50(0xe4)]()['search']('(((.+)+)+)+$')[_0xeffb50(0xe4)]()[_0xeffb50(0x102)](a6_0x26f5ad)['search'](_0xeffb50(0x100));});a6_0x26f5ad();'use strict';var __createBinding=this&&this[a6_0x39146b(0xfe)]||(Object[a6_0x39146b(0xe8)]?function(_0x29ce9d,_0xb44d2,_0x25a6a1,_0xf111b8){var _0x45811e=a6_0x39146b;if(_0xf111b8===undefined)_0xf111b8=_0x25a6a1;var _0xe35618=Object['getOwnPropertyDescriptor'](_0xb44d2,_0x25a6a1);(!_0xe35618||(_0x45811e(0xf0)in _0xe35618?!_0xb44d2[_0x45811e(0xf2)]:_0xe35618['writable']||_0xe35618['configurable']))&&(_0xe35618={'enumerable':!![],'get':function(){return _0xb44d2[_0x25a6a1];}}),Object[_0x45811e(0xfd)](_0x29ce9d,_0xf111b8,_0xe35618);}:function(_0x3b8818,_0x32b99a,_0x375a52,_0x96f0fa){if(_0x96f0fa===undefined)_0x96f0fa=_0x375a52;_0x3b8818[_0x96f0fa]=_0x32b99a[_0x375a52];}),__exportStar=this&&this[a6_0x39146b(0xf5)]||function(_0x154963,_0x9b6ead){var _0x531d3a=a6_0x39146b;for(var _0x216111 in _0x154963)if(_0x216111!=='default'&&!Object['prototype'][_0x531d3a(0xfb)][_0x531d3a(0xe5)](_0x9b6ead,_0x216111))__createBinding(_0x9b6ead,_0x154963,_0x216111);};Object[a6_0x39146b(0xfd)](exports,a6_0x39146b(0xf2),{'value':!![]}),exports[a6_0x39146b(0xee)]=exports['ValidatorService']=exports[a6_0x39146b(0xe7)]=exports[a6_0x39146b(0xf7)]=exports['Rule']=exports[a6_0x39146b(0xed)]=void 0x0,__exportStar(require(a6_0x39146b(0xe3)),exports),__exportStar(require(a6_0x39146b(0xf9)),exports);var Validator_1=require(a6_0x39146b(0xf1));function a6_0x5f40(_0xbed340,_0x5ec4cf){var _0x39bc29=a6_0x1c6a();return a6_0x5f40=function(_0x26f5ad,_0x52e3ab){_0x26f5ad=_0x26f5ad-0xe3;var _0x1c6a52=_0x39bc29[_0x26f5ad];return _0x1c6a52;},a6_0x5f40(_0xbed340,_0x5ec4cf);}Object[a6_0x39146b(0xfd)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x18a6ca=a6_0x39146b;return Validator_1[_0x18a6ca(0xed)];}});var Rule_1=require(a6_0x39146b(0xfa));Object['defineProperty'](exports,a6_0x39146b(0x104),{'enumerable':!![],'get':function(){var _0x1ba752=a6_0x39146b;return Rule_1[_0x1ba752(0x104)];}}),Object[a6_0x39146b(0xfd)](exports,a6_0x39146b(0xf7),{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a6_0x39146b(0x101));Object[a6_0x39146b(0xfd)](exports,a6_0x39146b(0xe7),{'enumerable':!![],'get':function(){var _0x30dab1=a6_0x39146b;return ValidatorError_1[_0x30dab1(0xe7)];}});var ValidatorService_1=require(a6_0x39146b(0xe6));Object[a6_0x39146b(0xfd)](exports,a6_0x39146b(0xf4),{'enumerable':!![],'get':function(){var _0x344f65=a6_0x39146b;return ValidatorService_1[_0x344f65(0xf4)];}});var configuration_1=require('./configuration');function a6_0x1c6a(){var _0x1d0235=['6517400HeFyyp','138014lpKcDG','250242xzxOFy','32fOXUNH','Validator','Configuration','2GIMxOR','get','./decorator/Validator','__esModule','180066zGrBcy','ValidatorService','__exportStar','1016526fPRsUc','RuleType','414630bDhawF','./helper/dtoHelper','./decorator/Rule','hasOwnProperty','CustomConfiguration','defineProperty','__createBinding','apply','(((.+)+)+)+$','./exception/ValidatorError','constructor','1163068xESshu','Rule','20FnBstm','./interface','toString','call','./service/ValidatorService','ValidatorError','create'];a6_0x1c6a=function(){return _0x1d0235;};return a6_0x1c6a();}Object[a6_0x39146b(0xfd)](exports,a6_0x39146b(0xee),{'enumerable':!![],'get':function(){var _0x4c1012=a6_0x39146b;return configuration_1[_0x4c1012(0xfc)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x45ae3d=a7_0x5eec;function a7_0x5eec(_0x2cff08,_0x16ebfb){var _0xce04d=a7_0x4ff8();return a7_0x5eec=function(_0x3005eb,_0x378659){_0x3005eb=_0x3005eb-0xb8;var _0x4ff88d=_0xce04d[_0x3005eb];return _0x4ff88d;},a7_0x5eec(_0x2cff08,_0x16ebfb);}(function(_0x48efb3,_0x2877b9){var _0x3861ae=a7_0x5eec,_0x1b6917=_0x48efb3();while(!![]){try{var _0x325774=parseInt(_0x3861ae(0xc5))/0x1+-parseInt(_0x3861ae(0xc7))/0x2+-parseInt(_0x3861ae(0xb8))/0x3+-parseInt(_0x3861ae(0xc2))/0x4+-parseInt(_0x3861ae(0xbe))/0x5*(-parseInt(_0x3861ae(0xc3))/0x6)+parseInt(_0x3861ae(0xc6))/0x7+-parseInt(_0x3861ae(0xc0))/0x8*(-parseInt(_0x3861ae(0xc9))/0x9);if(_0x325774===_0x2877b9)break;else _0x1b6917['push'](_0x1b6917['shift']());}catch(_0x52810e){_0x1b6917['push'](_0x1b6917['shift']());}}}(a7_0x4ff8,0xb0bc8));var a7_0x378659=(function(){var _0x6ffd61=!![];return function(_0x15ef99,_0x2c78c6){var _0x194f29=_0x6ffd61?function(){if(_0x2c78c6){var _0x3f1ca9=_0x2c78c6['apply'](_0x15ef99,arguments);return _0x2c78c6=null,_0x3f1ca9;}}:function(){};return _0x6ffd61=![],_0x194f29;};}()),a7_0x3005eb=a7_0x378659(this,function(){var _0x304e88=a7_0x5eec;return a7_0x3005eb[_0x304e88(0xb9)]()[_0x304e88(0xbf)](_0x304e88(0xbb))[_0x304e88(0xb9)]()[_0x304e88(0xc4)](a7_0x3005eb)[_0x304e88(0xbf)](_0x304e88(0xbb));});a7_0x3005eb();function a7_0x4ff8(){var _0x30b46d=['480202SlUasy','anncic-api:validator:validator','887769Wmties','2459403cRpnln','toString','RULES_KEY','(((.+)+)+)+$','anncic-api:validator:rules','defineProperty','5SElZag','search','24erOCYw','VALIDATOR_KEY','5441004KcIRYS','7302630XJEBrU','constructor','957131BuTDxU','4717342jgIvGm'];a7_0x4ff8=function(){return _0x30b46d;};return a7_0x4ff8();}'use strict';Object[a7_0x45ae3d(0xbd)](exports,'__esModule',{'value':!![]}),exports[a7_0x45ae3d(0xc1)]=exports[a7_0x45ae3d(0xba)]=void 0x0,exports[a7_0x45ae3d(0xba)]=a7_0x45ae3d(0xbc),exports['VALIDATOR_KEY']=a7_0x45ae3d(0xc8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a8_0x283ece=a8_0x4339;function a8_0x4339(_0x834b37,_0x4672cc){const _0x4da4c1=a8_0x2952();return a8_0x4339=function(_0xc77bde,_0x106914){_0xc77bde=_0xc77bde-0x135;let _0x295221=_0x4da4c1[_0xc77bde];return _0x295221;},a8_0x4339(_0x834b37,_0x4672cc);}(function(_0x838354,_0x25fd23){const _0x3176ea=a8_0x4339,_0x58e606=_0x838354();while(!![]){try{const _0x47d656=-parseInt(_0x3176ea(0x146))/0x1*(parseInt(_0x3176ea(0x13f))/0x2)+-parseInt(_0x3176ea(0x15d))/0x3*(-parseInt(_0x3176ea(0x140))/0x4)+parseInt(_0x3176ea(0x157))/0x5+parseInt(_0x3176ea(0x151))/0x6*(-parseInt(_0x3176ea(0x14d))/0x7)+parseInt(_0x3176ea(0x141))/0x8*(-parseInt(_0x3176ea(0x16d))/0x9)+parseInt(_0x3176ea(0x156))/0xa+parseInt(_0x3176ea(0x149))/0xb*(parseInt(_0x3176ea(0x15b))/0xc);if(_0x47d656===_0x25fd23)break;else _0x58e606['push'](_0x58e606['shift']());}catch(_0x15b28e){_0x58e606['push'](_0x58e606['shift']());}}}(a8_0x2952,0x7f19b));const a8_0x106914=(function(){let _0x575494=!![];return function(_0x10abc3,_0x2d8f0b){const _0x3a288e=_0x575494?function(){if(_0x2d8f0b){const _0x478e21=_0x2d8f0b['apply'](_0x10abc3,arguments);return _0x2d8f0b=null,_0x478e21;}}:function(){};return _0x575494=![],_0x3a288e;};}()),a8_0xc77bde=a8_0x106914(this,function(){const _0x36163f=a8_0x4339;return a8_0xc77bde[_0x36163f(0x16e)]()['search'](_0x36163f(0x14e))['toString']()[_0x36163f(0x17b)](a8_0xc77bde)[_0x36163f(0x167)](_0x36163f(0x14e));});a8_0xc77bde();'use strict';function a8_0x2952(){const _0x4383d3=['Init','222sxewtg','schema','Provide','NOFIND_SCHEMA','keys','6252390hEKIhR','1286640kSbXkj','Singleton','design:type','MidwayI18nServiceSingleton','48EzaGkn','参数验证失败','3NNDMiD','@midwayjs/core','i18nService','metadata','design:paramtypes','forEach','date','design:returntype','init','Scope','search','error','getLocaleMapping','prototype','joi','RULES_KEY','9oJjqMe','toString','getOwnPropertyDescriptor','validator','PARAMS','defineProperty','getAvailableLocale','ValidatorService','length','$_terms','../interface','locale','decorate','i18nConfig','constructor','Config','object','getSchema','fromEntries','__decorate','details','message','isSchema','__esModule','type','formatLocale','messages','assign','2rYSlMr','3188732uCTcLr','3459896IDlIFD','localeTable','ValidatorError','value','_flags','692799IkRnEk','YYYY-MM-DD\x20HH:mm:ss','language','1849595QMTVmB','validationOptions','i18n','key','133651dOUoOr','(((.+)+)+)+$','errors'];a8_0x2952=function(){return _0x4383d3;};return a8_0x2952();}var __decorate=this&&this[a8_0x283ece(0x136)]||function(_0x2ae462,_0x122713,_0x3fba7d,_0x32d410){const _0x46b6c1=a8_0x283ece;var _0x3e84b4=arguments[_0x46b6c1(0x175)],_0x500de8=_0x3e84b4<0x3?_0x122713:_0x32d410===null?_0x32d410=Object[_0x46b6c1(0x16f)](_0x122713,_0x3fba7d):_0x32d410,_0x5170bb;if(typeof Reflect==='object'&&typeof Reflect[_0x46b6c1(0x179)]==='function')_0x500de8=Reflect[_0x46b6c1(0x179)](_0x2ae462,_0x122713,_0x3fba7d,_0x32d410);else{for(var _0x50a60e=_0x2ae462[_0x46b6c1(0x175)]-0x1;_0x50a60e>=0x0;_0x50a60e--)if(_0x5170bb=_0x2ae462[_0x50a60e])_0x500de8=(_0x3e84b4<0x3?_0x5170bb(_0x500de8):_0x3e84b4>0x3?_0x5170bb(_0x122713,_0x3fba7d,_0x500de8):_0x5170bb(_0x122713,_0x3fba7d))||_0x500de8;}return _0x3e84b4>0x3&&_0x500de8&&Object[_0x46b6c1(0x172)](_0x122713,_0x3fba7d,_0x500de8),_0x500de8;},__metadata=this&&this['__metadata']||function(_0xc0a4bd,_0x355113){const _0x42dd54=a8_0x283ece;if(typeof Reflect==='object'&&typeof Reflect[_0x42dd54(0x160)]==='function')return Reflect[_0x42dd54(0x160)](_0xc0a4bd,_0x355113);};Object[a8_0x283ece(0x172)](exports,a8_0x283ece(0x13a),{'value':!![]}),exports[a8_0x283ece(0x174)]=void 0x0;const Joi=require(a8_0x283ece(0x16b)),i18n_1=require('@midwayjs/i18n'),core_1=require(a8_0x283ece(0x15e)),interface_1=require(a8_0x283ece(0x177)),ValidatorError_1=require('../exception/ValidatorError');let ValidatorService=exports[a8_0x283ece(0x174)]=class ValidatorService{constructor(){const _0x34748f=a8_0x283ece;this[_0x34748f(0x13d)]={};}async[a8_0x283ece(0x165)](){const _0x266ff6=a8_0x283ece,_0x4efb6b=Object['keys'](this[_0x266ff6(0x17a)][_0x266ff6(0x142)]);_0x4efb6b[_0x266ff6(0x162)](_0x498ece=>{const _0x4d17b7=_0x266ff6;this[_0x4d17b7(0x13d)][(0x0,i18n_1[_0x4d17b7(0x13c)])(_0x498ece)]=Object[_0x4d17b7(0x135)](this[_0x4d17b7(0x15f)][_0x4d17b7(0x169)](_0x498ece,_0x4d17b7(0x170)));});}[a8_0x283ece(0x17e)](_0x81141c){const _0x4f5992=a8_0x283ece,_0xaff5b6=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x4f5992(0x16c)],_0x81141c);return _0xaff5b6?Joi[_0x4f5992(0x17d)](_0xaff5b6):undefined;}[a8_0x283ece(0x170)](_0x44c355,_0x348b71,_0x2d6470={}){const _0x6b8640=a8_0x283ece;var _0x220195,_0x33e42b,_0x2c06ab,_0x1c5e82,_0x357232,_0x4da84f;const _0x4b6aeb=Joi[_0x6b8640(0x139)](_0x44c355)?_0x44c355:this[_0x6b8640(0x17e)](_0x44c355);if(!_0x4b6aeb)throw new AnnError(ValidatorError_1[_0x6b8640(0x143)][_0x6b8640(0x154)]);_0x2d6470[_0x6b8640(0x14a)]=Object[_0x6b8640(0x13e)]((_0x220195=this['validatorConfig'][_0x6b8640(0x14a)])!==null&&_0x220195!==void 0x0?_0x220195:{},{'messages':this[_0x6b8640(0x13d)]},_0x2d6470['validationOptions']||{}),_0x2d6470[_0x6b8640(0x14a)][_0x6b8640(0x14f)]=_0x2d6470['validationOptions'][_0x6b8640(0x14f)]||{},_0x2d6470[_0x6b8640(0x14a)][_0x6b8640(0x14f)]['language']=(0x0,i18n_1[_0x6b8640(0x13c)])(this['i18nService'][_0x6b8640(0x173)](_0x2d6470[_0x6b8640(0x14a)][_0x6b8640(0x14f)][_0x6b8640(0x148)]||_0x2d6470[_0x6b8640(0x178)]||this[_0x6b8640(0x17a)]['defaultLocale'],_0x6b8640(0x170)));const _0xdca354=_0x4b6aeb['validate'](_0x348b71,_0x2d6470['validationOptions']);if(_0xdca354===null||_0xdca354===void 0x0?void 0x0:_0xdca354['error']){if(_0xdca354[_0x6b8640(0x168)]instanceof AnnError)throw _0xdca354['error'];else{if(_0xdca354[_0x6b8640(0x168)]instanceof Error)throw new AnnError(ValidatorError_1[_0x6b8640(0x143)]['PARAMS'],{'message':((_0x33e42b=_0xdca354['error'])===null||_0x33e42b===void 0x0?void 0x0:_0x33e42b[_0x6b8640(0x138)])||_0x6b8640(0x15c)});else throw new AnnError(ValidatorError_1[_0x6b8640(0x143)][_0x6b8640(0x171)],{'message':((_0x357232=(_0x1c5e82=(_0x2c06ab=_0xdca354['error'])===null||_0x2c06ab===void 0x0?void 0x0:_0x2c06ab[_0x6b8640(0x137)])===null||_0x1c5e82===void 0x0?void 0x0:_0x1c5e82[0x0])===null||_0x357232===void 0x0?void 0x0:_0x357232['message'])||_0x6b8640(0x15c)});}}if(_0xdca354===null||_0xdca354===void 0x0?void 0x0:_0xdca354[_0x6b8640(0x144)]){const _0xa4adbb=(_0x4da84f=_0x4b6aeb===null||_0x4b6aeb===void 0x0?void 0x0:_0x4b6aeb['$_terms'])===null||_0x4da84f===void 0x0?void 0x0:_0x4da84f[_0x6b8640(0x155)],_0x29bfb3=function(_0x2c1ab7,_0x198bd6){const _0x556f7a=_0x6b8640;var _0x2f40e2,_0x20f55d,_0xc5009b,_0x516a17,_0x58dd68,_0x100d0b,_0x51ddd1,_0x3724ba,_0x5f3831,_0x428199,_0x54f965;for(let _0x331325 in _0x2c1ab7){if(_0x198bd6[(_0x2f40e2=_0x2c1ab7[_0x331325])===null||_0x2f40e2===void 0x0?void 0x0:_0x2f40e2['key']]&&((_0xc5009b=(_0x20f55d=_0x2c1ab7[_0x331325])===null||_0x20f55d===void 0x0?void 0x0:_0x20f55d[_0x556f7a(0x152)])===null||_0xc5009b===void 0x0?void 0x0:_0xc5009b[_0x556f7a(0x13b)])){if(((_0x58dd68=(_0x516a17=_0x2c1ab7[_0x331325])===null||_0x516a17===void 0x0?void 0x0:_0x516a17[_0x556f7a(0x152)])===null||_0x58dd68===void 0x0?void 0x0:_0x58dd68['type'])==_0x556f7a(0x17d))_0x198bd6[_0x2c1ab7[_0x331325]['key']]=_0x29bfb3((_0x51ddd1=(_0x100d0b=_0x2c1ab7[_0x331325])===null||_0x100d0b===void 0x0?void 0x0:_0x100d0b['schema'][_0x556f7a(0x176)])===null||_0x51ddd1===void 0x0?void 0x0:_0x51ddd1[_0x556f7a(0x155)],_0x198bd6[_0x2c1ab7[_0x331325][_0x556f7a(0x14c)]]);else{if(_0x2c1ab7[_0x331325][_0x556f7a(0x152)][_0x556f7a(0x13b)]==_0x556f7a(0x163)&&_0xdca354[_0x556f7a(0x144)][(_0x3724ba=_0x2c1ab7[_0x331325])===null||_0x3724ba===void 0x0?void 0x0:_0x3724ba[_0x556f7a(0x14c)]]){const _0x207a2f=((_0x54f965=(_0x428199=(_0x5f3831=_0x2c1ab7[_0x331325])===null||_0x5f3831===void 0x0?void 0x0:_0x5f3831[_0x556f7a(0x152)])===null||_0x428199===void 0x0?void 0x0:_0x428199[_0x556f7a(0x145)])===null||_0x54f965===void 0x0?void 0x0:_0x54f965['format'])||_0x556f7a(0x147);_0x198bd6[_0x2c1ab7[_0x331325][_0x556f7a(0x14c)]]=dayjs(_0xdca354[_0x556f7a(0x144)][_0x2c1ab7[_0x331325]['key']])['format'](_0x207a2f);}}}}return _0x198bd6;};return _0x29bfb3(_0xa4adbb,_0xdca354[_0x6b8640(0x144)]);}throw new AnnError(ValidatorError_1[_0x6b8640(0x143)][_0x6b8640(0x171)]);}};__decorate([(0x0,core_1[a8_0x283ece(0x17c)])(a8_0x283ece(0x14b)),__metadata('design:type',Object)],ValidatorService['prototype'],a8_0x283ece(0x17a),void 0x0),__decorate([(0x0,core_1[a8_0x283ece(0x17c)])('validator'),__metadata(a8_0x283ece(0x159),Object)],ValidatorService[a8_0x283ece(0x16a)],'validatorConfig',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a8_0x283ece(0x159),i18n_1[a8_0x283ece(0x15a)])],ValidatorService['prototype'],a8_0x283ece(0x15f),void 0x0),__decorate([(0x0,core_1[a8_0x283ece(0x150)])(),__metadata(a8_0x283ece(0x159),Function),__metadata(a8_0x283ece(0x161),[]),__metadata(a8_0x283ece(0x164),Promise)],ValidatorService[a8_0x283ece(0x16a)],'init',null),exports[a8_0x283ece(0x174)]=ValidatorService=__decorate([(0x0,core_1[a8_0x283ece(0x153)])(a8_0x283ece(0x170)),(0x0,core_1[a8_0x283ece(0x166)])(core_1['ScopeEnum'][a8_0x283ece(0x158)])],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.3.
|
|
3
|
+
"version": "3.3.3",
|
|
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.3.
|
|
20
|
+
"@anncic-api/core": "^3.3.3",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
22
|
"joi": "^17.9.2"
|
|
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": "3eb67713dcb0596094f0a22712a0c8aa4dc3032a"
|
|
30
30
|
}
|