@anncic-api/validator 3.4.11 → 3.4.15
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
|
+
function a0_0x50fe(_0x590a07,_0x1c58b8){const _0x1bf4ff=a0_0x1865();return a0_0x50fe=function(_0xad55f3,_0x366b5f){_0xad55f3=_0xad55f3-0x163;let _0x1865ba=_0x1bf4ff[_0xad55f3];return _0x1865ba;},a0_0x50fe(_0x590a07,_0x1c58b8);}const a0_0x1ac8b2=a0_0x50fe;(function(_0x3704c0,_0x4f59b8){const _0x116694=a0_0x50fe,_0x2cb032=_0x3704c0();while(!![]){try{const _0x15acc2=parseInt(_0x116694(0x170))/0x1+-parseInt(_0x116694(0x173))/0x2+parseInt(_0x116694(0x171))/0x3*(-parseInt(_0x116694(0x172))/0x4)+parseInt(_0x116694(0x16a))/0x5+parseInt(_0x116694(0x167))/0x6+parseInt(_0x116694(0x174))/0x7*(-parseInt(_0x116694(0x169))/0x8)+-parseInt(_0x116694(0x16c))/0x9*(-parseInt(_0x116694(0x176))/0xa);if(_0x15acc2===_0x4f59b8)break;else _0x2cb032['push'](_0x2cb032['shift']());}catch(_0x3372a1){_0x2cb032['push'](_0x2cb032['shift']());}}}(a0_0x1865,0xe19a3));const a0_0x366b5f=(function(){let _0x4a84cf=!![];return function(_0x57c2b6,_0x3baf28){const _0x4016f2=_0x4a84cf?function(){const _0x5651d3=a0_0x50fe;if(_0x3baf28){const _0x37dfd3=_0x3baf28[_0x5651d3(0x16f)](_0x57c2b6,arguments);return _0x3baf28=null,_0x37dfd3;}}:function(){};return _0x4a84cf=![],_0x4016f2;};}()),a0_0xad55f3=a0_0x366b5f(this,function(){const _0x1dec38=a0_0x50fe;return a0_0xad55f3[_0x1dec38(0x163)]()[_0x1dec38(0x165)]('(((.+)+)+)+$')['toString']()[_0x1dec38(0x166)](a0_0xad55f3)[_0x1dec38(0x165)]('(((.+)+)+)+$');});a0_0xad55f3();'use strict';Object['defineProperty'](exports,a0_0x1ac8b2(0x168),{'value':!![]});function a0_0x1865(){const _0x56d65f=['8786505cTHpza','PARAMS','4311jbbwlL','default','../exception/ValidatorError','apply','586986aoDTyZ','2172ODQqtt','1336rLOcWx','3068204GAqali','4242JgdGDD','string','4770vrFbID','toString','../../locales/en_US.json','search','constructor','10584126rrbXEM','__esModule','21608XactZx'];a0_0x1865=function(){return _0x56d65f;};return a0_0x1865();}const ValidatorError_1=require(a0_0x1ac8b2(0x16e));exports[a0_0x1ac8b2(0x16d)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x1ac8b2(0x16b)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x1ac8b2(0x175)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x1ac8b2(0x164))},'zh_CN':{'validator':require('../../locales/zh_CN.json')}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x46cc6a=a1_0xa40a;(function(_0x2e22d1,_0xf16821){const _0x2ff26c=a1_0xa40a,_0x38b863=_0x2e22d1();while(!![]){try{const _0x31526a=parseInt(_0x2ff26c(0x117))/0x1*(-parseInt(_0x2ff26c(0xed))/0x2)+-parseInt(_0x2ff26c(0x116))/0x3+parseInt(_0x2ff26c(0x10b))/0x4*(-parseInt(_0x2ff26c(0xe0))/0x5)+parseInt(_0x2ff26c(0x10f))/0x6*(parseInt(_0x2ff26c(0x105))/0x7)+-parseInt(_0x2ff26c(0xdc))/0x8+parseInt(_0x2ff26c(0x10c))/0x9+parseInt(_0x2ff26c(0xea))/0xa;if(_0x31526a===_0xf16821)break;else _0x38b863['push'](_0x38b863['shift']());}catch(_0x408fc1){_0x38b863['push'](_0x38b863['shift']());}}}(a1_0x18a1,0x7eef3));const a1_0x5c7477=(function(){let _0x50abbf=!![];return function(_0x42bcb0,_0x47b0ac){const _0x422e01=_0x50abbf?function(){const _0x484a0d=a1_0xa40a;if(_0x47b0ac){const _0x14cd51=_0x47b0ac[_0x484a0d(0xf6)](_0x42bcb0,arguments);return _0x47b0ac=null,_0x14cd51;}}:function(){};return _0x50abbf=![],_0x422e01;};}()),a1_0x1ae34b=a1_0x5c7477(this,function(){const _0x572068=a1_0xa40a;return a1_0x1ae34b[_0x572068(0x110)]()[_0x572068(0x112)](_0x572068(0xf4))['toString']()[_0x572068(0x104)](a1_0x1ae34b)[_0x572068(0x112)](_0x572068(0xf4));});a1_0x1ae34b();'use strict';function a1_0xa40a(_0x417087,_0x33c738){const _0x5bf04c=a1_0x18a1();return a1_0xa40a=function(_0x1ae34b,_0x5c7477){_0x1ae34b=_0x1ae34b-0xdc;let _0x18a18a=_0x5bf04c[_0x1ae34b];return _0x18a18a;},a1_0xa40a(_0x417087,_0x33c738);}function a1_0x18a1(){const _0x10254a=['search','body','anncic-api:validator','method','2727573LZrLAf','6189IefNri','propertyName','assign','request','404544swnvcf','params','locale','./interface','18955fbqZBi','args','req','getSchema','bound\x20dispatch','Configuration','__esModule','I18N_ATTR_KEY','function','decorator','14808690WaAlXy','design:type','defineProperty','168wVQLSi','splice','query','object','prototype','methodName','registerMethodHandler','(((.+)+)+)+$','ValidatorService','apply','methodArgs','@midwayjs/core','decorate','VALIDATOR_KEY','getOwnPropertyDescriptor','onReady','./config/config.default','getAttr','__decorate','name','./service/ValidatorService','@anncic-api/core','target','constructor','21287YhmJTz','length','Inject','validator','metadata','CustomConfiguration','684XQWYiw','3331872bdCoZi','@midwayjs/i18n','res','1572sNdBYS','toString','find'];a1_0x18a1=function(){return _0x10254a;};return a1_0x18a1();}var __decorate=this&&this[a1_0x46cc6a(0xff)]||function(_0x86b9b4,_0x126cc8,_0xd721ee,_0x217fba){const _0x48fd1f=a1_0x46cc6a;var _0x9cfb4=arguments[_0x48fd1f(0x106)],_0x2d9888=_0x9cfb4<0x3?_0x126cc8:_0x217fba===null?_0x217fba=Object[_0x48fd1f(0xfb)](_0x126cc8,_0xd721ee):_0x217fba,_0x548dac;if(typeof Reflect===_0x48fd1f(0xf0)&&typeof Reflect['decorate']===_0x48fd1f(0xe8))_0x2d9888=Reflect[_0x48fd1f(0xf9)](_0x86b9b4,_0x126cc8,_0xd721ee,_0x217fba);else{for(var _0x567bae=_0x86b9b4[_0x48fd1f(0x106)]-0x1;_0x567bae>=0x0;_0x567bae--)if(_0x548dac=_0x86b9b4[_0x567bae])_0x2d9888=(_0x9cfb4<0x3?_0x548dac(_0x2d9888):_0x9cfb4>0x3?_0x548dac(_0x126cc8,_0xd721ee,_0x2d9888):_0x548dac(_0x126cc8,_0xd721ee))||_0x2d9888;}return _0x9cfb4>0x3&&_0x2d9888&&Object[_0x48fd1f(0xec)](_0x126cc8,_0xd721ee,_0x2d9888),_0x2d9888;},__metadata=this&&this['__metadata']||function(_0x33c8be,_0x3000ba){const _0x31d6f0=a1_0x46cc6a;if(typeof Reflect===_0x31d6f0(0xf0)&&typeof Reflect[_0x31d6f0(0x109)]===_0x31d6f0(0xe8))return Reflect['metadata'](_0x33c8be,_0x3000ba);};Object[a1_0x46cc6a(0xec)](exports,a1_0x46cc6a(0xe6),{'value':!![]}),exports[a1_0x46cc6a(0x10a)]=void 0x0;const i18n_1=require(a1_0x46cc6a(0x10d)),core_1=require('@midwayjs/core'),core_2=require(a1_0x46cc6a(0xf8)),interface_1=require(a1_0x46cc6a(0xdf)),ValidatorService_1=require(a1_0x46cc6a(0x101)),i18n=require(a1_0x46cc6a(0x10d)),anncic=require(a1_0x46cc6a(0x102)),ConfigDefault=require(a1_0x46cc6a(0xfd));let CustomConfiguration=class CustomConfiguration{async[a1_0x46cc6a(0xfc)](){const _0x2c6f6a=a1_0x46cc6a;this[_0x2c6f6a(0xe9)][_0x2c6f6a(0xf3)](interface_1[_0x2c6f6a(0xfa)],_0x506ea0=>{const _0x2ed570=_0x2c6f6a,_0x444eae=_0x506ea0[_0x2ed570(0x109)],_0x5a9992=(0x0,core_2['getMethodParamTypes'])(_0x506ea0['target'],_0x506ea0[_0x2ed570(0x118)]);return{'before':_0x5925e0=>{const _0x5c37df=_0x2ed570;var _0x82744b,_0x4ead41,_0xd7ad7b,_0x2a2776,_0x69d3e8,_0x5997f3,_0x309331,_0x43099e,_0x5949c4,_0x3444bb,_0x58c13b,_0x204124,_0x260dbc;const _0x29f1e3=_0x5925e0['target'][core_1['REQUEST_OBJ_CTX_KEY']],_0x5aa7a3=Object[_0x5c37df(0x119)]({},((_0x82744b=_0x29f1e3===null||_0x29f1e3===void 0x0?void 0x0:_0x29f1e3[_0x5c37df(0x11a)])===null||_0x82744b===void 0x0?void 0x0:_0x82744b[_0x5c37df(0xef)])||{},((_0x4ead41=_0x29f1e3===null||_0x29f1e3===void 0x0?void 0x0:_0x29f1e3[_0x5c37df(0x11a)])===null||_0x4ead41===void 0x0?void 0x0:_0x4ead41[_0x5c37df(0x113)])||{}),_0x4c7b34=((0x0,core_2['getClassMetadata'])(interface_1[_0x5c37df(0xfa)],_0x5925e0[_0x5c37df(0x103)])||[])[_0x5c37df(0x111)](_0x159fba=>_0x159fba[_0x5c37df(0x115)]==_0x5925e0[_0x5c37df(0xf2)]);!(_0x444eae===null||_0x444eae===void 0x0?void 0x0:_0x444eae[_0x5c37df(0xde)])&&_0x29f1e3&&_0x29f1e3[_0x5c37df(0xfe)]&&(_0x444eae[_0x5c37df(0xde)]=_0x29f1e3[_0x5c37df(0xfe)](i18n_1[_0x5c37df(0xe7)]));for(let _0x3fe325=0x0;_0x3fe325<_0x5a9992[_0x5c37df(0x106)];_0x3fe325++){const _0x5616f8=_0x5a9992[_0x3fe325],_0xd31c18=this[_0x5c37df(0xf5)][_0x5c37df(0xe3)](_0x5616f8);if(_0xd31c18){if(typeof _0x5925e0['args'][_0x3fe325]=='undefined'||((_0xd7ad7b=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0xd7ad7b===void 0x0?void 0x0:_0xd7ad7b[_0x5c37df(0x11a)])&&((_0x2a2776=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0x2a2776===void 0x0?void 0x0:_0x2a2776[_0x5c37df(0x10e)])&&((_0x69d3e8=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0x69d3e8===void 0x0?void 0x0:_0x69d3e8[_0x5c37df(0xe2)]))_0x5925e0['args'][_0x3fe325]=_0x5aa7a3;else((_0x5997f3=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0x5997f3===void 0x0?void 0x0:_0x5997f3[_0x5c37df(0x100)])==_0x5c37df(0xe4)&&_0x5925e0[_0x5c37df(0xe1)][_0x5c37df(0xee)](_0x3fe325,0x0,_0x5aa7a3);const _0x2b124b=this[_0x5c37df(0xf5)][_0x5c37df(0x108)](_0xd31c18,_0x5925e0['args'][_0x3fe325],_0x444eae);_0x2b124b&&(_0x5925e0['args'][_0x3fe325]=_0x2b124b);}else{if((_0x4c7b34===null||_0x4c7b34===void 0x0?void 0x0:_0x4c7b34[_0x5c37df(0xf7)][_0x3fe325])&&((_0x309331=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0x309331===void 0x0?void 0x0:_0x309331[_0x5c37df(0xdd)])&&typeof _0x5925e0[_0x5c37df(0xe1)][_0x3fe325]['param']==_0x5c37df(0xe8)&&((_0x43099e=_0x29f1e3===null||_0x29f1e3===void 0x0?void 0x0:_0x29f1e3[_0x5c37df(0xdd)])===null||_0x43099e===void 0x0?void 0x0:_0x43099e[_0x4c7b34['methodArgs'][_0x3fe325]]))_0x5925e0['args'][_0x3fe325]=_0x5616f8((_0x5949c4=_0x29f1e3===null||_0x29f1e3===void 0x0?void 0x0:_0x29f1e3['params'])===null||_0x5949c4===void 0x0?void 0x0:_0x5949c4[_0x4c7b34[_0x5c37df(0xf7)][_0x3fe325]]);else(_0x4c7b34===null||_0x4c7b34===void 0x0?void 0x0:_0x4c7b34['methodArgs'][_0x3fe325])&&((_0x58c13b=(_0x3444bb=_0x5925e0['args'][_0x3fe325])===null||_0x3444bb===void 0x0?void 0x0:_0x3444bb[_0x5c37df(0xdd)])===null||_0x58c13b===void 0x0?void 0x0:_0x58c13b[_0x4c7b34[_0x5c37df(0xf7)][_0x3fe325]])&&(_0x5925e0[_0x5c37df(0xe1)][_0x3fe325]=(_0x260dbc=(_0x204124=_0x5925e0[_0x5c37df(0xe1)][_0x3fe325])===null||_0x204124===void 0x0?void 0x0:_0x204124['params'])===null||_0x260dbc===void 0x0?void 0x0:_0x260dbc[_0x4c7b34['methodArgs'][_0x3fe325]]);}}},'afterThrow':(_0x4ec844,_0x42ff21)=>{throw _0x42ff21;}};});}};exports[a1_0x46cc6a(0x10a)]=CustomConfiguration,__decorate([(0x0,core_2[a1_0x46cc6a(0x107)])(),__metadata('design:type',core_1['MidwayDecoratorService'])],CustomConfiguration[a1_0x46cc6a(0xf1)],'decorator',void 0x0),__decorate([(0x0,core_2[a1_0x46cc6a(0x107)])(),__metadata(a1_0x46cc6a(0xeb),ValidatorService_1[a1_0x46cc6a(0xf5)])],CustomConfiguration[a1_0x46cc6a(0xf1)],'ValidatorService',void 0x0),exports[a1_0x46cc6a(0x10a)]=CustomConfiguration=__decorate([(0x0,core_2[a1_0x46cc6a(0xe5)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x46cc6a(0x114),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a2_0x1e5e8e=a2_0x6e68;function a2_0x6e68(_0x2367e0,_0x137201){const _0x3afe8a=a2_0x3b2e();return a2_0x6e68=function(_0x4a66ee,_0x5213cf){_0x4a66ee=_0x4a66ee-0x10e;let _0x3b2e83=_0x3afe8a[_0x4a66ee];return _0x3b2e83;},a2_0x6e68(_0x2367e0,_0x137201);}(function(_0x2302a6,_0x2d28f7){const _0x45e0cd=a2_0x6e68,_0x3f57c8=_0x2302a6();while(!![]){try{const _0x38e989=-parseInt(_0x45e0cd(0x124))/0x1+parseInt(_0x45e0cd(0x12d))/0x2+-parseInt(_0x45e0cd(0x12b))/0x3+parseInt(_0x45e0cd(0x12e))/0x4+parseInt(_0x45e0cd(0x111))/0x5*(parseInt(_0x45e0cd(0x11d))/0x6)+parseInt(_0x45e0cd(0x11b))/0x7+-parseInt(_0x45e0cd(0x116))/0x8*(parseInt(_0x45e0cd(0x11c))/0x9);if(_0x38e989===_0x2d28f7)break;else _0x3f57c8['push'](_0x3f57c8['shift']());}catch(_0x50436c){_0x3f57c8['push'](_0x3f57c8['shift']());}}}(a2_0x3b2e,0xd7d44));const a2_0x5213cf=(function(){let _0x135647=!![];return function(_0x141737,_0x31bbbf){const _0x8da8f8=_0x135647?function(){const _0x521876=a2_0x6e68;if(_0x31bbbf){const _0x517c46=_0x31bbbf[_0x521876(0x12c)](_0x141737,arguments);return _0x31bbbf=null,_0x517c46;}}:function(){};return _0x135647=![],_0x8da8f8;};}()),a2_0x4a66ee=a2_0x5213cf(this,function(){const _0x52e2bc=a2_0x6e68;return a2_0x4a66ee[_0x52e2bc(0x129)]()[_0x52e2bc(0x121)](_0x52e2bc(0x11e))['toString']()[_0x52e2bc(0x118)](a2_0x4a66ee)[_0x52e2bc(0x121)](_0x52e2bc(0x11e));});a2_0x4a66ee();'use strict';function a2_0x3b2e(){const _0x3db626=['229313qUsTou','279SSgArq','162YyBHXj','(((.+)+)+)+$','extend','keys','search','saveClassMetadata','getClassMetadata','209848ftaNjA','@joi/date','function','joi','name','toString','Rule','1576470mztxFs','apply','1455278PFleLU','3574988EhiiRB','Array','RULES_KEY','description','293750UEUsvR','isSchema','RuleType','getPropertyType','attachClassMetadata','418328TAOzMT','items','constructor','meta','label'];a2_0x3b2e=function(){return _0x3db626;};return a2_0x3b2e();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Rule']=exports[a2_0x1e5e8e(0x113)]=void 0x0;const joi=require(a2_0x1e5e8e(0x127)),date_1=require(a2_0x1e5e8e(0x125)),core_1=require('@midwayjs/core'),interface_1=require('../interface');exports[a2_0x1e5e8e(0x113)]=joi[a2_0x1e5e8e(0x11f)](date_1['default']);function Rule(_0x104e4a,_0x29ccac,_0x3378dd=''){return(_0x5e0c3b,_0x40f06c)=>{const _0xbe3cd8=a2_0x6e68;var _0x51fd62;if(_0x40f06c)!joi['isSchema'](_0x29ccac)&&(_0x29ccac===null||_0x29ccac===void 0x0?void 0x0:_0x29ccac[_0xbe3cd8(0x128)])&&(_0x29ccac=joi['object']((0x0,core_1['getClassMetadata'])(interface_1['RULES_KEY'],_0x29ccac))[_0xbe3cd8(0x119)]({'id':_0x29ccac[_0xbe3cd8(0x128)]}),(0x0,core_1[_0xbe3cd8(0x114)])(_0x5e0c3b,_0x40f06c)[_0xbe3cd8(0x128)]===_0xbe3cd8(0x10e)&&(_0x29ccac=joi['array']()[_0xbe3cd8(0x117)](_0x29ccac))),joi[_0xbe3cd8(0x112)](_0x29ccac)&&(_0x104e4a&&typeof(_0x29ccac===null||_0x29ccac===void 0x0?void 0x0:_0x29ccac[_0xbe3cd8(0x11a)])==_0xbe3cd8(0x126)&&(_0x29ccac=_0x29ccac[_0xbe3cd8(0x11a)](_0x104e4a)),_0x3378dd&&typeof(_0x29ccac===null||_0x29ccac===void 0x0?void 0x0:_0x29ccac[_0xbe3cd8(0x110)])==_0xbe3cd8(0x126)&&(_0x29ccac=_0x29ccac['description'](_0x3378dd)),(0x0,core_1[_0xbe3cd8(0x115)])(interface_1[_0xbe3cd8(0x10f)],_0x29ccac,_0x5e0c3b,_0x40f06c));else{const _0x343095=(0x0,core_1['getClassMetadata'])(interface_1[_0xbe3cd8(0x10f)],_0x29ccac);if(_0x343095){let _0x1bac7d=(_0x51fd62=(0x0,core_1[_0xbe3cd8(0x123)])(interface_1[_0xbe3cd8(0x10f)],_0x5e0c3b))!==null&&_0x51fd62!==void 0x0?_0x51fd62:{};Object[_0xbe3cd8(0x120)](_0x343095)['map'](_0x6f9818=>{!_0x1bac7d[_0x6f9818]&&(_0x1bac7d[_0x6f9818]=_0x343095[_0x6f9818]);}),(0x0,core_1[_0xbe3cd8(0x122)])(interface_1['RULES_KEY'],_0x1bac7d,_0x5e0c3b);}}};}exports[a2_0x1e5e8e(0x12a)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a3_0x5216(_0x459a9a,_0x4d1a3e){const _0x253834=a3_0x22f0();return a3_0x5216=function(_0x8fdcc1,_0x2655a9){_0x8fdcc1=_0x8fdcc1-0x175;let _0x22f0ef=_0x253834[_0x8fdcc1];return _0x22f0ef;},a3_0x5216(_0x459a9a,_0x4d1a3e);}const a3_0x455670=a3_0x5216;(function(_0x14d267,_0x1585b3){const _0x2d1e22=a3_0x5216,_0x51976a=_0x14d267();while(!![]){try{const _0x42da1c=-parseInt(_0x2d1e22(0x18e))/0x1+-parseInt(_0x2d1e22(0x182))/0x2+parseInt(_0x2d1e22(0x179))/0x3*(-parseInt(_0x2d1e22(0x17d))/0x4)+parseInt(_0x2d1e22(0x18a))/0x5*(parseInt(_0x2d1e22(0x189))/0x6)+-parseInt(_0x2d1e22(0x181))/0x7*(-parseInt(_0x2d1e22(0x186))/0x8)+parseInt(_0x2d1e22(0x17c))/0x9*(-parseInt(_0x2d1e22(0x17e))/0xa)+parseInt(_0x2d1e22(0x178))/0xb*(parseInt(_0x2d1e22(0x183))/0xc);if(_0x42da1c===_0x1585b3)break;else _0x51976a['push'](_0x51976a['shift']());}catch(_0x41af46){_0x51976a['push'](_0x51976a['shift']());}}}(a3_0x22f0,0xbb297));const a3_0x2655a9=(function(){let _0x393d38=!![];return function(_0x3a5dfe,_0x47bc7b){const _0x2bccf7=_0x393d38?function(){const _0x3b4699=a3_0x5216;if(_0x47bc7b){const _0x21ca40=_0x47bc7b[_0x3b4699(0x184)](_0x3a5dfe,arguments);return _0x47bc7b=null,_0x21ca40;}}:function(){};return _0x393d38=![],_0x2bccf7;};}()),a3_0x8fdcc1=a3_0x2655a9(this,function(){const _0x5e5e90=a3_0x5216;return a3_0x8fdcc1[_0x5e5e90(0x18f)]()['search'](_0x5e5e90(0x18d))[_0x5e5e90(0x18f)]()[_0x5e5e90(0x175)](a3_0x8fdcc1)[_0x5e5e90(0x188)](_0x5e5e90(0x18d));});a3_0x8fdcc1();function a3_0x22f0(){const _0x375cff=['toString','constructor','getFuncArgs','@midwayjs/core','30759971LXVaug','3545985UPSceC','Validator','../interface','747uLxMHv','4zYdAEg','68890uJRCqE','indexOf','prototype','212205fReKKK','2017128wKYzlG','12oVqdFA','apply','VALIDATOR_KEY','200hoPzjD','function','search','2146386ugUhyd','5zPmzUs','defineProperty','replace','(((.+)+)+)+$','383006akHkOW'];a3_0x22f0=function(){return _0x375cff;};return a3_0x22f0();}'use strict';Object[a3_0x455670(0x18b)](exports,'__esModule',{'value':!![]}),exports[a3_0x455670(0x176)]=exports[a3_0x455670(0x17a)]=void 0x0;const core_1=require(a3_0x455670(0x177)),interface_1=require(a3_0x455670(0x17b));function Validator(_0x460f47={}){return(_0x1eba60,_0x3819ca,_0x281095)=>{const _0x484c9c=a3_0x5216,_0x1366b2=getFuncArgs(_0x1eba60[_0x3819ca]);(0x0,core_1['attachClassMetadata'])(interface_1[_0x484c9c(0x185)],{'method':_0x3819ca,'methodArgs':_0x1366b2},_0x1eba60),(0x0,core_1['createCustomMethodDecorator'])(interface_1[_0x484c9c(0x185)],_0x460f47)(_0x1eba60,_0x3819ca,_0x281095);};}exports[a3_0x455670(0x17a)]=Validator;function getFuncArgs(_0x78bfd8){const _0x8875d0=a3_0x455670;if(typeof _0x78bfd8==_0x8875d0(0x187)){const _0x296a04=/=>.*$/mg,_0x11741c=/=[^,)]+/mg,_0x5766b1=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x32e03=(_0x78bfd8[_0x8875d0(0x180)]?_0x78bfd8[_0x8875d0(0x180)]['constructor'][_0x8875d0(0x18f)]():_0x78bfd8[_0x8875d0(0x18f)]())[_0x8875d0(0x18c)](_0x5766b1,'')['replace'](_0x296a04,'')['replace'](_0x11741c,''),_0x3ec905=_0x32e03['slice'](_0x32e03[_0x8875d0(0x17f)]('(')+0x1,_0x32e03[_0x8875d0(0x17f)](')'))['match'](/([^\s,]+)/g)||[];return _0x3ec905;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a4_0x23f876=a4_0x1c7c;(function(_0xb2459c,_0x2c8d28){var _0x5b2975=a4_0x1c7c,_0x2f9adc=_0xb2459c();while(!![]){try{var _0x29159e=parseInt(_0x5b2975(0x8f))/0x1*(-parseInt(_0x5b2975(0x93))/0x2)+-parseInt(_0x5b2975(0x92))/0x3*(-parseInt(_0x5b2975(0x87))/0x4)+-parseInt(_0x5b2975(0x9f))/0x5+-parseInt(_0x5b2975(0x99))/0x6+-parseInt(_0x5b2975(0xa0))/0x7+-parseInt(_0x5b2975(0x96))/0x8+-parseInt(_0x5b2975(0x8e))/0x9*(-parseInt(_0x5b2975(0x8d))/0xa);if(_0x29159e===_0x2c8d28)break;else _0x2f9adc['push'](_0x2f9adc['shift']());}catch(_0x9567cc){_0x2f9adc['push'](_0x2f9adc['shift']());}}}(a4_0x3b95,0x69cad));var a4_0x108244=(function(){var _0x2906d3=!![];return function(_0x2e3cc2,_0x326b08){var _0x4d8b40=_0x2906d3?function(){var _0x1ebc38=a4_0x1c7c;if(_0x326b08){var _0x3642a0=_0x326b08[_0x1ebc38(0xa3)](_0x2e3cc2,arguments);return _0x326b08=null,_0x3642a0;}}:function(){};return _0x2906d3=![],_0x4d8b40;};}()),a4_0x417413=a4_0x108244(this,function(){var _0xb0de0c=a4_0x1c7c;return a4_0x417413['toString']()['search'](_0xb0de0c(0x88))[_0xb0de0c(0xa2)]()['constructor'](a4_0x417413)['search'](_0xb0de0c(0x88));});a4_0x417413();'use strict';var __decorate=this&&this[a4_0x23f876(0x90)]||function(_0x343858,_0x55b307,_0x21a2e6,_0x586b95){var _0x47f02e=a4_0x23f876,_0x36350a=arguments[_0x47f02e(0xa1)],_0x138652=_0x36350a<0x3?_0x55b307:_0x586b95===null?_0x586b95=Object[_0x47f02e(0x95)](_0x55b307,_0x21a2e6):_0x586b95,_0x2f707e;if(typeof Reflect==='object'&&typeof Reflect[_0x47f02e(0x9c)]==='function')_0x138652=Reflect[_0x47f02e(0x9c)](_0x343858,_0x55b307,_0x21a2e6,_0x586b95);else{for(var _0x2bb8ee=_0x343858[_0x47f02e(0xa1)]-0x1;_0x2bb8ee>=0x0;_0x2bb8ee--)if(_0x2f707e=_0x343858[_0x2bb8ee])_0x138652=(_0x36350a<0x3?_0x2f707e(_0x138652):_0x36350a>0x3?_0x2f707e(_0x55b307,_0x21a2e6,_0x138652):_0x2f707e(_0x55b307,_0x21a2e6))||_0x138652;}return _0x36350a>0x3&&_0x138652&&Object[_0x47f02e(0x9d)](_0x55b307,_0x21a2e6,_0x138652),_0x138652;},__metadata=this&&this['__metadata']||function(_0x39f718,_0x2d7a66){var _0x3fbed9=a4_0x23f876;if(typeof Reflect===_0x3fbed9(0x91)&&typeof Reflect[_0x3fbed9(0x9b)]===_0x3fbed9(0x97))return Reflect['metadata'](_0x39f718,_0x2d7a66);};Object[a4_0x23f876(0x9d)](exports,a4_0x23f876(0x8b),{'value':!![]}),exports[a4_0x23f876(0x9a)]=void 0x0;const core_1=require(a4_0x23f876(0x89));class ValidatorError extends AnnError{}function a4_0x3b95(){var _0x20b92c=['length','toString','apply','4TIpTnc','(((.+)+)+)+$','@anncic-api/core','AnnErrorMsg','__esModule','参数验证失败','6610eCRhTO','32229bzRQbH','672743rURAku','__decorate','object','2060214OfBHky','2cMFVdK','NOFIND_SCHEMA','getOwnPropertyDescriptor','5697184WDIbuT','function','PARAMS','3384840FsOlAj','ValidatorError','metadata','decorate','defineProperty','design:type','1879395gHxpJQ','2068808XRHOPx'];a4_0x3b95=function(){return _0x20b92c;};return a4_0x3b95();}function a4_0x1c7c(_0x4f53eb,_0x2befb6){var _0x301495=a4_0x3b95();return a4_0x1c7c=function(_0x417413,_0x108244){_0x417413=_0x417413-0x87;var _0x3b95a1=_0x301495[_0x417413];return _0x3b95a1;},a4_0x1c7c(_0x4f53eb,_0x2befb6);}exports[a4_0x23f876(0x9a)]=ValidatorError,ValidatorError[a4_0x23f876(0x98)]=0x18c1e,ValidatorError['NOFIND_SCHEMA']=0x18c1c,__decorate([(0x0,core_1[a4_0x23f876(0x8a)])(a4_0x23f876(0x8c)),__metadata(a4_0x23f876(0x9e),Object)],ValidatorError,a4_0x23f876(0x98),void 0x0),__decorate([(0x0,core_1[a4_0x23f876(0x8a)])(a4_0x23f876(0x8c)),__metadata(a4_0x23f876(0x9e),Object)],ValidatorError,a4_0x23f876(0x94),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x2c7a27=a5_0x1095;(function(_0x49360f,_0xe62cfe){const _0x4f712d=a5_0x1095,_0x1cb4fc=_0x49360f();while(!![]){try{const _0x359be8=-parseInt(_0x4f712d(0x18f))/0x1+parseInt(_0x4f712d(0x197))/0x2+-parseInt(_0x4f712d(0x19c))/0x3*(parseInt(_0x4f712d(0x19e))/0x4)+parseInt(_0x4f712d(0x1a2))/0x5*(-parseInt(_0x4f712d(0x199))/0x6)+-parseInt(_0x4f712d(0x198))/0x7+parseInt(_0x4f712d(0x19f))/0x8*(parseInt(_0x4f712d(0x194))/0x9)+parseInt(_0x4f712d(0x19a))/0xa;if(_0x359be8===_0xe62cfe)break;else _0x1cb4fc['push'](_0x1cb4fc['shift']());}catch(_0x1128a1){_0x1cb4fc['push'](_0x1cb4fc['shift']());}}}(a5_0x383a,0x3952f));const a5_0x5f4ed2=(function(){let _0x2ef55e=!![];return function(_0x28cb37,_0x3df1f3){const _0x4a8462=_0x2ef55e?function(){const _0x29cb41=a5_0x1095;if(_0x3df1f3){const _0x2a51ad=_0x3df1f3[_0x29cb41(0x1a0)](_0x28cb37,arguments);return _0x3df1f3=null,_0x2a51ad;}}:function(){};return _0x2ef55e=![],_0x4a8462;};}()),a5_0x2258dd=a5_0x5f4ed2(this,function(){const _0x3800c6=a5_0x1095;return a5_0x2258dd[_0x3800c6(0x190)]()[_0x3800c6(0x19b)]('(((.+)+)+)+$')['toString']()[_0x3800c6(0x1a1)](a5_0x2258dd)[_0x3800c6(0x19b)](_0x3800c6(0x192));});function a5_0x1095(_0x37b72c,_0x34d804){const _0x3c7053=a5_0x383a();return a5_0x1095=function(_0x2258dd,_0x5f4ed2){_0x2258dd=_0x2258dd-0x18c;let _0x383a85=_0x3c7053[_0x2258dd];return _0x383a85;},a5_0x1095(_0x37b72c,_0x34d804);}a5_0x2258dd();'use strict';function a5_0x383a(){const _0x347ad2=['@midwayjs/core','defineProperty','540482sTmiPX','287063BNHRIm','102hkpEFF','6983720AXQGIq','search','3Ifidns','assign','1121696VycHHQ','8tOgjGw','apply','constructor','93185vzwNSI','getClassExtendedMetadata','OmitDto','RULES_KEY','../interface','265248JARdiF','toString','PickDto','(((.+)+)+)+$','prototype','1527264eoEWLs'];a5_0x383a=function(){return _0x347ad2;};return a5_0x383a();}Object[a5_0x2c7a27(0x196)](exports,'__esModule',{'value':!![]}),exports[a5_0x2c7a27(0x18c)]=exports[a5_0x2c7a27(0x191)]=void 0x0;const core_1=require(a5_0x2c7a27(0x195)),interface_1=require(a5_0x2c7a27(0x18e));function PickDto(_0x11e955,_0x4e82c1){const _0x278aec=a5_0x2c7a27,_0x45546c=function(){};_0x45546c[_0x278aec(0x193)]=_0x11e955['prototype'];const _0x9387=(0x0,core_1[_0x278aec(0x1a3)])(interface_1[_0x278aec(0x18d)],_0x11e955),_0x57f065={};for(const _0x55eb55 of _0x4e82c1){_0x9387[_0x55eb55]&&(_0x57f065[_0x55eb55]=_0x9387[_0x55eb55]);}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x278aec(0x18d)],_0x57f065,_0x45546c),_0x45546c;}exports[a5_0x2c7a27(0x191)]=PickDto;function OmitDto(_0x5e9eb7,_0x39e996){const _0x5c7d0a=a5_0x2c7a27,_0x3f2d3c=function(){};_0x3f2d3c[_0x5c7d0a(0x193)]=_0x5e9eb7['prototype'];const _0x271a82=(0x0,core_1[_0x5c7d0a(0x1a3)])(interface_1[_0x5c7d0a(0x18d)],_0x5e9eb7),_0x2b4d85=Object[_0x5c7d0a(0x19d)]({},_0x271a82);for(const _0x231c68 of _0x39e996){delete _0x2b4d85[_0x231c68];}return(0x0,core_1['saveClassMetadata'])(interface_1[_0x5c7d0a(0x18d)],_0x2b4d85,_0x3f2d3c),_0x3f2d3c;}exports[a5_0x2c7a27(0x18c)]=OmitDto;
|
package/dist/helper/getSchema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x2bc08a=a6_0x4791;function a6_0x4791(_0x1fa0b8,_0x3d2b86){const _0x30f997=a6_0x5ddd();return a6_0x4791=function(_0x1898fd,_0xfedfe4){_0x1898fd=_0x1898fd-0xe1;let _0x5ddd13=_0x30f997[_0x1898fd];return _0x5ddd13;},a6_0x4791(_0x1fa0b8,_0x3d2b86);}(function(_0x52f248,_0x5105b7){const _0x3a57df=a6_0x4791,_0x4f7449=_0x52f248();while(!![]){try{const _0x200251=-parseInt(_0x3a57df(0xe6))/0x1*(-parseInt(_0x3a57df(0xed))/0x2)+-parseInt(_0x3a57df(0xf0))/0x3*(parseInt(_0x3a57df(0xe3))/0x4)+-parseInt(_0x3a57df(0xe5))/0x5+parseInt(_0x3a57df(0xe8))/0x6*(parseInt(_0x3a57df(0xe4))/0x7)+-parseInt(_0x3a57df(0xe7))/0x8+parseInt(_0x3a57df(0xf3))/0x9+parseInt(_0x3a57df(0xee))/0xa*(parseInt(_0x3a57df(0xf6))/0xb);if(_0x200251===_0x5105b7)break;else _0x4f7449['push'](_0x4f7449['shift']());}catch(_0x4cdf7d){_0x4f7449['push'](_0x4f7449['shift']());}}}(a6_0x5ddd,0x4c525));const a6_0xfedfe4=(function(){let _0x595631=!![];return function(_0x386c57,_0x5f480d){const _0x26e909=_0x595631?function(){const _0xd6389d=a6_0x4791;if(_0x5f480d){const _0xed885=_0x5f480d[_0xd6389d(0xef)](_0x386c57,arguments);return _0x5f480d=null,_0xed885;}}:function(){};return _0x595631=![],_0x26e909;};}()),a6_0x1898fd=a6_0xfedfe4(this,function(){const _0x4a6af3=a6_0x4791;return a6_0x1898fd['toString']()[_0x4a6af3(0xf5)]('(((.+)+)+)+$')[_0x4a6af3(0xeb)]()[_0x4a6af3(0xf2)](a6_0x1898fd)['search'](_0x4a6af3(0xf4));});a6_0x1898fd();'use strict';Object[a6_0x2bc08a(0xf7)](exports,a6_0x2bc08a(0xe2),{'value':!![]}),exports['getSchema']=void 0x0;const Joi=require('joi'),core_1=require('@midwayjs/core'),interface_1=require(a6_0x2bc08a(0xe1));function getSchema(_0x3bb81b){const _0x2500ae=a6_0x2bc08a,_0x2039c8=(0x0,core_1[_0x2500ae(0xe9)])(interface_1[_0x2500ae(0xec)],_0x3bb81b);if(_0x2039c8)return Joi[_0x2500ae(0xea)](_0x2039c8);}function a6_0x5ddd(){const _0x3c4f14=['defineProperty','../interface','__esModule','188iHTYAk','7dJoyTB','3004765MOqaKx','1bysJxJ','3788824TTDZYd','399822XPgZTt','getClassExtendedMetadata','object','toString','RULES_KEY','539118AipDhB','10945970OEjcXA','apply','5007oSGtRx','getSchema','constructor','313371jxGDDH','(((.+)+)+)+$','search','11hbeHJi'];a6_0x5ddd=function(){return _0x3c4f14;};return a6_0x5ddd();}exports[a6_0x2bc08a(0xf1)]=getSchema;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a7_0x482152=a7_0x32f1;(function(_0x39ea07,_0x574302){var _0x3a1012=a7_0x32f1,_0x290471=_0x39ea07();while(!![]){try{var _0x17a694=parseInt(_0x3a1012(0x17a))/0x1+-parseInt(_0x3a1012(0x190))/0x2+parseInt(_0x3a1012(0x193))/0x3+-parseInt(_0x3a1012(0x181))/0x4*(parseInt(_0x3a1012(0x191))/0x5)+parseInt(_0x3a1012(0x180))/0x6*(-parseInt(_0x3a1012(0x192))/0x7)+-parseInt(_0x3a1012(0x18e))/0x8+-parseInt(_0x3a1012(0x198))/0x9*(-parseInt(_0x3a1012(0x184))/0xa);if(_0x17a694===_0x574302)break;else _0x290471['push'](_0x290471['shift']());}catch(_0x362bee){_0x290471['push'](_0x290471['shift']());}}}(a7_0x5b18,0xa1529));var a7_0x24c111=(function(){var _0xa4c845=!![];return function(_0x5ec4e6,_0xea03e8){var _0x210c80=_0xa4c845?function(){var _0x31253f=a7_0x32f1;if(_0xea03e8){var _0x55e5c3=_0xea03e8[_0x31253f(0x197)](_0x5ec4e6,arguments);return _0xea03e8=null,_0x55e5c3;}}:function(){};return _0xa4c845=![],_0x210c80;};}()),a7_0x22b07e=a7_0x24c111(this,function(){var _0x5a3bfe=a7_0x32f1;return a7_0x22b07e['toString']()[_0x5a3bfe(0x17d)](_0x5a3bfe(0x182))[_0x5a3bfe(0x183)]()[_0x5a3bfe(0x199)](a7_0x22b07e)[_0x5a3bfe(0x17d)]('(((.+)+)+)+$');});a7_0x22b07e();'use strict';var __createBinding=this&&this[a7_0x482152(0x196)]||(Object[a7_0x482152(0x186)]?function(_0x59e417,_0x3823d9,_0x39c928,_0x30949e){var _0x50a856=a7_0x482152;if(_0x30949e===undefined)_0x30949e=_0x39c928;var _0x11a22b=Object['getOwnPropertyDescriptor'](_0x3823d9,_0x39c928);(!_0x11a22b||(_0x50a856(0x19a)in _0x11a22b?!_0x3823d9[_0x50a856(0x17b)]:_0x11a22b[_0x50a856(0x19d)]||_0x11a22b['configurable']))&&(_0x11a22b={'enumerable':!![],'get':function(){return _0x3823d9[_0x39c928];}}),Object[_0x50a856(0x195)](_0x59e417,_0x30949e,_0x11a22b);}:function(_0x5999c2,_0x568ecd,_0x9cb65b,_0x1e7e0c){if(_0x1e7e0c===undefined)_0x1e7e0c=_0x9cb65b;_0x5999c2[_0x1e7e0c]=_0x568ecd[_0x9cb65b];}),__exportStar=this&&this['__exportStar']||function(_0x20725c,_0x19cdaa){var _0x5ce6cf=a7_0x482152;for(var _0x1c3385 in _0x20725c)if(_0x1c3385!==_0x5ce6cf(0x18d)&&!Object[_0x5ce6cf(0x17f)]['hasOwnProperty'][_0x5ce6cf(0x18a)](_0x19cdaa,_0x1c3385))__createBinding(_0x19cdaa,_0x20725c,_0x1c3385);};Object[a7_0x482152(0x195)](exports,a7_0x482152(0x17b),{'value':!![]}),exports[a7_0x482152(0x17e)]=exports['ValidatorService']=exports[a7_0x482152(0x187)]=exports[a7_0x482152(0x19e)]=exports['Rule']=exports[a7_0x482152(0x185)]=void 0x0,__exportStar(require(a7_0x482152(0x18b)),exports),__exportStar(require(a7_0x482152(0x17c)),exports),__exportStar(require(a7_0x482152(0x188)),exports);function a7_0x32f1(_0x2a0293,_0x37f453){var _0x2be13c=a7_0x5b18();return a7_0x32f1=function(_0x22b07e,_0x24c111){_0x22b07e=_0x22b07e-0x17a;var _0x5b18b9=_0x2be13c[_0x22b07e];return _0x5b18b9;},a7_0x32f1(_0x2a0293,_0x37f453);}var Validator_1=require(a7_0x482152(0x189));Object[a7_0x482152(0x195)](exports,'Validator',{'enumerable':!![],'get':function(){var _0x4703b7=a7_0x482152;return Validator_1[_0x4703b7(0x185)];}});var Rule_1=require(a7_0x482152(0x19c));Object[a7_0x482152(0x195)](exports,a7_0x482152(0x18c),{'enumerable':!![],'get':function(){return Rule_1['Rule'];}}),Object['defineProperty'](exports,a7_0x482152(0x19e),{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a7_0x482152(0x19f));Object[a7_0x482152(0x195)](exports,a7_0x482152(0x187),{'enumerable':!![],'get':function(){return ValidatorError_1['ValidatorError'];}});var ValidatorService_1=require('./service/ValidatorService');function a7_0x5b18(){var _0x480c94=['ValidatorService','1233334XpuDgv','322555PzJRJb','6251zRvlNj','2512647lJLUVZ','./configuration','defineProperty','__createBinding','apply','15580881YPetBI','constructor','get','CustomConfiguration','./decorator/Rule','writable','RuleType','./exception/ValidatorError','255151eCwDzF','__esModule','./helper/dtoHelper','search','Configuration','prototype','1086BJuMDt','64zztomg','(((.+)+)+)+$','toString','10fLHjkl','Validator','create','ValidatorError','./helper/getSchema','./decorator/Validator','call','./interface','Rule','default','2821248qGtwhl'];a7_0x5b18=function(){return _0x480c94;};return a7_0x5b18();}Object['defineProperty'](exports,a7_0x482152(0x18f),{'enumerable':!![],'get':function(){return ValidatorService_1['ValidatorService'];}});var configuration_1=require(a7_0x482152(0x194));Object[a7_0x482152(0x195)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x24bf35=a7_0x482152;return configuration_1[_0x24bf35(0x19b)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a8_0x56e623=a8_0x39a0;function a8_0x23bb(){var _0x206e2e=['3272484DZqkHX','2QslqIY','68548Eydbsa','__esModule','VALIDATOR_KEY','RULES_KEY','4kzkoLa','522jSlVth','(((.+)+)+)+$','search','12321zImcEu','65597CEVRiA','toString','1448WHHfUp','11HofVgF','1046004cbQfCj','defineProperty','10977730kSTENk','2897580OVsJFb'];a8_0x23bb=function(){return _0x206e2e;};return a8_0x23bb();}(function(_0x4e375d,_0x58e3e2){var _0x16e053=a8_0x39a0,_0x3edff8=_0x4e375d();while(!![]){try{var _0x413f77=-parseInt(_0x16e053(0x13e))/0x1*(parseInt(_0x16e053(0x13f))/0x2)+parseInt(_0x16e053(0x139))/0x3*(parseInt(_0x16e053(0x143))/0x4)+parseInt(_0x16e053(0x13c))/0x5+-parseInt(_0x16e053(0x144))/0x6*(-parseInt(_0x16e053(0x148))/0x7)+parseInt(_0x16e053(0x14a))/0x8*(parseInt(_0x16e053(0x147))/0x9)+-parseInt(_0x16e053(0x13b))/0xa*(parseInt(_0x16e053(0x138))/0xb)+-parseInt(_0x16e053(0x13d))/0xc;if(_0x413f77===_0x58e3e2)break;else _0x3edff8['push'](_0x3edff8['shift']());}catch(_0x36ffe9){_0x3edff8['push'](_0x3edff8['shift']());}}}(a8_0x23bb,0x86d1e));var a8_0x90de2f=(function(){var _0x56a052=!![];return function(_0x2c87c6,_0x24aec2){var _0x18374e=_0x56a052?function(){if(_0x24aec2){var _0x5612cb=_0x24aec2['apply'](_0x2c87c6,arguments);return _0x24aec2=null,_0x5612cb;}}:function(){};return _0x56a052=![],_0x18374e;};}()),a8_0x16ae36=a8_0x90de2f(this,function(){var _0x3a4479=a8_0x39a0;return a8_0x16ae36[_0x3a4479(0x149)]()['search'](_0x3a4479(0x145))['toString']()['constructor'](a8_0x16ae36)[_0x3a4479(0x146)](_0x3a4479(0x145));});a8_0x16ae36();'use strict';function a8_0x39a0(_0x78a61c,_0x508586){var _0x58abc9=a8_0x23bb();return a8_0x39a0=function(_0x16ae36,_0x90de2f){_0x16ae36=_0x16ae36-0x138;var _0x23bba9=_0x58abc9[_0x16ae36];return _0x23bba9;},a8_0x39a0(_0x78a61c,_0x508586);}Object[a8_0x56e623(0x13a)](exports,a8_0x56e623(0x140),{'value':!![]}),exports[a8_0x56e623(0x141)]=exports[a8_0x56e623(0x142)]=void 0x0,exports[a8_0x56e623(0x142)]='anncic-api:validator:rules',exports[a8_0x56e623(0x141)]='anncic-api:validator:validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a9_0xf1383d=a9_0x1f4d;(function(_0x2fc73b,_0x1ee8b0){const _0x1f2239=a9_0x1f4d,_0x5aebbb=_0x2fc73b();while(!![]){try{const _0x206e6c=parseInt(_0x1f2239(0x98))/0x1+-parseInt(_0x1f2239(0x70))/0x2+-parseInt(_0x1f2239(0xbb))/0x3*(parseInt(_0x1f2239(0xb5))/0x4)+parseInt(_0x1f2239(0xa7))/0x5*(-parseInt(_0x1f2239(0x86))/0x6)+parseInt(_0x1f2239(0x95))/0x7*(parseInt(_0x1f2239(0x82))/0x8)+parseInt(_0x1f2239(0xa2))/0x9+parseInt(_0x1f2239(0x7e))/0xa;if(_0x206e6c===_0x1ee8b0)break;else _0x5aebbb['push'](_0x5aebbb['shift']());}catch(_0x4f8f77){_0x5aebbb['push'](_0x5aebbb['shift']());}}}(a9_0x136a,0xbd73b));const a9_0x2abe03=(function(){let _0x46d78b=!![];return function(_0x387ffb,_0x30f07d){const _0x55cd00=_0x46d78b?function(){const _0x3ae04f=a9_0x1f4d;if(_0x30f07d){const _0x2006de=_0x30f07d[_0x3ae04f(0x89)](_0x387ffb,arguments);return _0x30f07d=null,_0x2006de;}}:function(){};return _0x46d78b=![],_0x55cd00;};}()),a9_0x594c00=a9_0x2abe03(this,function(){const _0x4fdf91=a9_0x1f4d;return a9_0x594c00['toString']()[_0x4fdf91(0xb6)](_0x4fdf91(0x9b))[_0x4fdf91(0x7c)]()[_0x4fdf91(0xb3)](a9_0x594c00)['search'](_0x4fdf91(0x9b));});a9_0x594c00();'use strict';var __decorate=this&&this[a9_0xf1383d(0x78)]||function(_0x36370d,_0x207c34,_0x2683b9,_0x5d6f99){const _0x2d3b53=a9_0xf1383d;var _0x307681=arguments[_0x2d3b53(0xb0)],_0x226a81=_0x307681<0x3?_0x207c34:_0x5d6f99===null?_0x5d6f99=Object[_0x2d3b53(0x94)](_0x207c34,_0x2683b9):_0x5d6f99,_0x40376e;if(typeof Reflect==='object'&&typeof Reflect[_0x2d3b53(0x75)]===_0x2d3b53(0xbc))_0x226a81=Reflect[_0x2d3b53(0x75)](_0x36370d,_0x207c34,_0x2683b9,_0x5d6f99);else{for(var _0x4f543b=_0x36370d[_0x2d3b53(0xb0)]-0x1;_0x4f543b>=0x0;_0x4f543b--)if(_0x40376e=_0x36370d[_0x4f543b])_0x226a81=(_0x307681<0x3?_0x40376e(_0x226a81):_0x307681>0x3?_0x40376e(_0x207c34,_0x2683b9,_0x226a81):_0x40376e(_0x207c34,_0x2683b9))||_0x226a81;}return _0x307681>0x3&&_0x226a81&&Object[_0x2d3b53(0xa5)](_0x207c34,_0x2683b9,_0x226a81),_0x226a81;},__metadata=this&&this[a9_0xf1383d(0x88)]||function(_0x58a418,_0x304025){const _0x4ba4c0=a9_0xf1383d;if(typeof Reflect===_0x4ba4c0(0xb9)&&typeof Reflect[_0x4ba4c0(0xa9)]===_0x4ba4c0(0xbc))return Reflect['metadata'](_0x58a418,_0x304025);};function a9_0x1f4d(_0x559666,_0x3e0b67){const _0xc1ed81=a9_0x136a();return a9_0x1f4d=function(_0x594c00,_0x2abe03){_0x594c00=_0x594c00-0x70;let _0x136af0=_0xc1ed81[_0x594c00];return _0x136af0;},a9_0x1f4d(_0x559666,_0x3e0b67);}function a9_0x136a(){const _0x254828=['MidwayI18nServiceSingleton','assign','getOwnPropertyDescriptor','566755cYvGfK','fromEntries','PARAMS','1454301Eabsmc','formatLocale','getClassExtendedMetadata','(((.+)+)+)+$','Scope','date','language','$_terms','key','getLocaleMapping','11833569YveVSN','validatorConfig','validator','defineProperty','defaultLocale','195ueccEp','init','metadata','_flags','../interface','localeTable','../exception/ValidatorError','@midwayjs/core','prototype','length','__esModule','messages','constructor','errors','44VIHNDD','search','format','getSchema','object','RULES_KEY','396201GRAqGb','function','2509092bVByrb','YYYY-MM-DD\x20HH:mm:ss','i18nService','@midwayjs/i18n','ValidatorError','decorate','schema','validate','__decorate','type','message','ValidatorService','toString','locale','6339880cFQMFL','参数验证失败','validationOptions','forEach','24DdTGci','i18nConfig','Config','details','25038xQOPJJ','design:type','__metadata','apply','Inject','getAvailableLocale','value','i18n','error','isSchema','ScopeEnum','joi'];a9_0x136a=function(){return _0x254828;};return a9_0x136a();}Object[a9_0xf1383d(0xa5)](exports,a9_0xf1383d(0xb1),{'value':!![]}),exports[a9_0xf1383d(0x7b)]=void 0x0;const Joi=require(a9_0xf1383d(0x91)),i18n_1=require(a9_0xf1383d(0x73)),core_1=require(a9_0xf1383d(0xae)),interface_1=require(a9_0xf1383d(0xab)),ValidatorError_1=require(a9_0xf1383d(0xad));let ValidatorService=class ValidatorService{constructor(){this['messages']={};}async['init'](){const _0x395d09=a9_0xf1383d,_0x5da809=Object['keys'](this[_0x395d09(0x83)][_0x395d09(0xac)]);_0x5da809[_0x395d09(0x81)](_0x2bef0f=>{const _0xff7ab1=_0x395d09;this['messages'][(0x0,i18n_1['formatLocale'])(_0x2bef0f)]=Object[_0xff7ab1(0x96)](this[_0xff7ab1(0x72)][_0xff7ab1(0xa1)](_0x2bef0f,_0xff7ab1(0xa4)));});}[a9_0xf1383d(0xb8)](_0x2e63cc){const _0x4d4bd8=a9_0xf1383d,_0x13db7a=(0x0,core_1[_0x4d4bd8(0x9a)])(interface_1[_0x4d4bd8(0xba)],_0x2e63cc);return _0x13db7a?Joi[_0x4d4bd8(0xb9)](_0x13db7a):undefined;}[a9_0xf1383d(0xa4)](_0x24e7c5,_0x2ce7a9,_0x19d800={}){const _0x455369=a9_0xf1383d;var _0x303d0e,_0xdb9557,_0xe63dc9,_0x2e31fa,_0x29603a,_0x3d1064;const _0x4ba28f=Joi[_0x455369(0x8f)](_0x24e7c5)?_0x24e7c5:this['getSchema'](_0x24e7c5);if(!_0x4ba28f)throw new AnnError(ValidatorError_1['ValidatorError']['NOFIND_SCHEMA']);_0x19d800['validationOptions']=Object[_0x455369(0x93)]((_0x303d0e=this[_0x455369(0xa3)][_0x455369(0x80)])!==null&&_0x303d0e!==void 0x0?_0x303d0e:{},{'messages':this[_0x455369(0xb2)]},_0x19d800[_0x455369(0x80)]||{}),_0x19d800[_0x455369(0x80)][_0x455369(0xb4)]=_0x19d800[_0x455369(0x80)][_0x455369(0xb4)]||{},_0x19d800[_0x455369(0x80)][_0x455369(0xb4)][_0x455369(0x9e)]=(0x0,i18n_1[_0x455369(0x99)])(this[_0x455369(0x72)][_0x455369(0x8b)](_0x19d800['validationOptions'][_0x455369(0xb4)][_0x455369(0x9e)]||_0x19d800[_0x455369(0x7d)]||this[_0x455369(0x83)][_0x455369(0xa6)],'validator'));const _0x1c2e3a=_0x4ba28f[_0x455369(0x77)](_0x2ce7a9,_0x19d800[_0x455369(0x80)]);if(_0x1c2e3a===null||_0x1c2e3a===void 0x0?void 0x0:_0x1c2e3a['error']){if(_0x1c2e3a[_0x455369(0x8e)]instanceof AnnError)throw _0x1c2e3a[_0x455369(0x8e)];else{if(_0x1c2e3a[_0x455369(0x8e)]instanceof Error)throw new AnnError(ValidatorError_1[_0x455369(0x74)][_0x455369(0x97)],{'message':((_0xdb9557=_0x1c2e3a[_0x455369(0x8e)])===null||_0xdb9557===void 0x0?void 0x0:_0xdb9557[_0x455369(0x7a)])||_0x455369(0x7f)});else throw new AnnError(ValidatorError_1['ValidatorError']['PARAMS'],{'message':((_0x29603a=(_0x2e31fa=(_0xe63dc9=_0x1c2e3a['error'])===null||_0xe63dc9===void 0x0?void 0x0:_0xe63dc9[_0x455369(0x85)])===null||_0x2e31fa===void 0x0?void 0x0:_0x2e31fa[0x0])===null||_0x29603a===void 0x0?void 0x0:_0x29603a[_0x455369(0x7a)])||'参数验证失败'});}}if(_0x1c2e3a===null||_0x1c2e3a===void 0x0?void 0x0:_0x1c2e3a[_0x455369(0x8c)]){const _0x51d6dc=(_0x3d1064=_0x4ba28f===null||_0x4ba28f===void 0x0?void 0x0:_0x4ba28f['$_terms'])===null||_0x3d1064===void 0x0?void 0x0:_0x3d1064['keys'],_0x14a06c=function(_0x1323cc,_0x5bcad6){const _0x117ca5=_0x455369;var _0x406174,_0x294580,_0x5f7ae,_0x2e9875,_0x3a5631,_0x1f820f,_0x560285,_0x8b34a5,_0x451bcc,_0x137197,_0x515d9f;for(let _0x4e8bee in _0x1323cc){if(_0x5bcad6[(_0x406174=_0x1323cc[_0x4e8bee])===null||_0x406174===void 0x0?void 0x0:_0x406174[_0x117ca5(0xa0)]]&&((_0x5f7ae=(_0x294580=_0x1323cc[_0x4e8bee])===null||_0x294580===void 0x0?void 0x0:_0x294580[_0x117ca5(0x76)])===null||_0x5f7ae===void 0x0?void 0x0:_0x5f7ae[_0x117ca5(0x79)])){if(((_0x3a5631=(_0x2e9875=_0x1323cc[_0x4e8bee])===null||_0x2e9875===void 0x0?void 0x0:_0x2e9875['schema'])===null||_0x3a5631===void 0x0?void 0x0:_0x3a5631[_0x117ca5(0x79)])=='object')_0x5bcad6[_0x1323cc[_0x4e8bee][_0x117ca5(0xa0)]]=_0x14a06c((_0x560285=(_0x1f820f=_0x1323cc[_0x4e8bee])===null||_0x1f820f===void 0x0?void 0x0:_0x1f820f[_0x117ca5(0x76)][_0x117ca5(0x9f)])===null||_0x560285===void 0x0?void 0x0:_0x560285['keys'],_0x5bcad6[_0x1323cc[_0x4e8bee][_0x117ca5(0xa0)]]);else{if(_0x1323cc[_0x4e8bee][_0x117ca5(0x76)][_0x117ca5(0x79)]==_0x117ca5(0x9d)&&_0x1c2e3a['value'][(_0x8b34a5=_0x1323cc[_0x4e8bee])===null||_0x8b34a5===void 0x0?void 0x0:_0x8b34a5[_0x117ca5(0xa0)]]){const _0x5e5c96=((_0x515d9f=(_0x137197=(_0x451bcc=_0x1323cc[_0x4e8bee])===null||_0x451bcc===void 0x0?void 0x0:_0x451bcc['schema'])===null||_0x137197===void 0x0?void 0x0:_0x137197[_0x117ca5(0xaa)])===null||_0x515d9f===void 0x0?void 0x0:_0x515d9f[_0x117ca5(0xb7)])||_0x117ca5(0x71);_0x5bcad6[_0x1323cc[_0x4e8bee]['key']]=dayjs(_0x1c2e3a[_0x117ca5(0x8c)][_0x1323cc[_0x4e8bee][_0x117ca5(0xa0)]])[_0x117ca5(0xb7)](_0x5e5c96);}}}}return _0x5bcad6;};return _0x14a06c(_0x51d6dc,_0x1c2e3a['value']);}throw new AnnError(ValidatorError_1[_0x455369(0x74)][_0x455369(0x97)]);}};exports[a9_0xf1383d(0x7b)]=ValidatorService,__decorate([(0x0,core_1[a9_0xf1383d(0x84)])(a9_0xf1383d(0x8d)),__metadata(a9_0xf1383d(0x87),Object)],ValidatorService[a9_0xf1383d(0xaf)],'i18nConfig',void 0x0),__decorate([(0x0,core_1[a9_0xf1383d(0x84)])('validator'),__metadata(a9_0xf1383d(0x87),Object)],ValidatorService[a9_0xf1383d(0xaf)],'validatorConfig',void 0x0),__decorate([(0x0,core_1[a9_0xf1383d(0x8a)])(),__metadata('design:type',i18n_1[a9_0xf1383d(0x92)])],ValidatorService['prototype'],a9_0xf1383d(0x72),void 0x0),__decorate([(0x0,core_1['Init'])(),__metadata(a9_0xf1383d(0x87),Function),__metadata('design:paramtypes',[]),__metadata('design:returntype',Promise)],ValidatorService[a9_0xf1383d(0xaf)],a9_0xf1383d(0xa8),null),exports['ValidatorService']=ValidatorService=__decorate([(0x0,core_1['Provide'])('validator'),(0x0,core_1[a9_0xf1383d(0x9c)])(core_1[a9_0xf1383d(0x90)]['Singleton'])],ValidatorService);
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './dist/index';
|
|
3
|
-
|
|
4
|
-
declare module 'joi' {
|
|
5
|
-
|
|
6
|
-
interface DateSchema {
|
|
7
|
-
format(format: string | string[]): this;
|
|
8
|
-
utc(): this;
|
|
9
|
-
}
|
|
1
|
+
|
|
2
|
+
export * from './dist/index';
|
|
3
|
+
|
|
4
|
+
declare module 'joi' {
|
|
5
|
+
|
|
6
|
+
interface DateSchema {
|
|
7
|
+
format(format: string | string[]): this;
|
|
8
|
+
utc(): this;
|
|
9
|
+
}
|
|
10
10
|
}
|
package/locales/en_US.json
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
{
|
|
2
|
-
"alternatives.all": "{{#label}} does not match all of the required types",
|
|
3
|
-
"alternatives.any": "{{#label}} does not match any of the allowed types",
|
|
4
|
-
"alternatives.match": "{{#label}} does not match any of the allowed types",
|
|
5
|
-
"alternatives.one": "{{#label}} matches more than one allowed type",
|
|
6
|
-
"alternatives.types": "{{#label}} must be one of {{#types}}",
|
|
7
|
-
"any.custom": "{{#label}} failed custom validation because {{#error.message}}",
|
|
8
|
-
"any.default": "{{#label}} threw an error when running default method",
|
|
9
|
-
"any.failover": "{{#label}} threw an error when running failover method",
|
|
10
|
-
"any.invalid": "{{#label}} contains an invalid value",
|
|
11
|
-
"any.only": "{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}",
|
|
12
|
-
"any.ref": "{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}",
|
|
13
|
-
"any.required": "{{#label}} is required",
|
|
14
|
-
"any.unknown": "{{#label}} is not allowed",
|
|
15
|
-
"array.base": "{{#label}} must be an array",
|
|
16
|
-
"array.excludes": "{{#label}} contains an excluded value",
|
|
17
|
-
"array.hasKnown": "{{#label}} does not contain at least one required match for type {:#patternLabel}",
|
|
18
|
-
"array.hasUnknown": "{{#label}} does not contain at least one required match",
|
|
19
|
-
"array.includes": "{{#label}} does not match any of the allowed types",
|
|
20
|
-
"array.includesRequiredBoth": "{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)",
|
|
21
|
-
"array.includesRequiredKnowns": "{{#label}} does not contain {{#knownMisses}}",
|
|
22
|
-
"array.includesRequiredUnknowns": "{{#label}} does not contain {{#unknownMisses}} required value(s)",
|
|
23
|
-
"array.length": "{{#label}} must contain {{#limit}} items",
|
|
24
|
-
"array.max": "{{#label}} must contain less than or equal to {{#limit}} items",
|
|
25
|
-
"array.min": "{{#label}} must contain at least {{#limit}} items",
|
|
26
|
-
"array.orderedLength": "{{#label}} must contain at most {{#limit}} items",
|
|
27
|
-
"array.sort": "{{#label}} must be sorted in {#order} order by {{#by}}",
|
|
28
|
-
"array.sort.mismatching": "{{#label}} cannot be sorted due to mismatching types",
|
|
29
|
-
"array.sort.unsupported": "{{#label}} cannot be sorted due to unsupported type {#type}",
|
|
30
|
-
"array.sparse": "{{#label}} must not be a sparse array item",
|
|
31
|
-
"array.unique": "{{#label}} contains a duplicate value",
|
|
32
|
-
"binary.base": "{{#label}} must be a buffer or a string",
|
|
33
|
-
"binary.length": "{{#label}} must be {{#limit}} bytes",
|
|
34
|
-
"binary.max": "{{#label}} must be less than or equal to {{#limit}} bytes",
|
|
35
|
-
"binary.min": "{{#label}} must be at least {{#limit}} bytes",
|
|
36
|
-
"boolean.base": "{{#label}} must be a boolean",
|
|
37
|
-
"date.base": "{{#label}} must be a valid date",
|
|
38
|
-
"date.format": "{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format",
|
|
39
|
-
"date.greater": "{{#label}} must be greater than {{:#limit}}",
|
|
40
|
-
"date.less": "{{#label}} must be less than {{:#limit}}",
|
|
41
|
-
"date.max": "{{#label}} must be less than or equal to {{:#limit}}",
|
|
42
|
-
"date.min": "{{#label}} must be greater than or equal to {{:#limit}}",
|
|
43
|
-
"date.format.iso": "ISO 8601 date",
|
|
44
|
-
"date.format.javascript": "timestamp or number of milliseconds",
|
|
45
|
-
"date.format.unix": "timestamp or number of seconds",
|
|
46
|
-
"function.arity": "{{#label}} must have an arity of {{#n}}",
|
|
47
|
-
"function.class": "{{#label}} must be a class",
|
|
48
|
-
"function.maxArity": "{{#label}} must have an arity lesser or equal to {{#n}}",
|
|
49
|
-
"function.minArity": "{{#label}} must have an arity greater or equal to {{#n}}",
|
|
50
|
-
"object.and": "{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}",
|
|
51
|
-
"object.assert": "{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
-
"object.base": "{{#label}} must be of type {{#type}}",
|
|
53
|
-
"object.instance": "{{#label}} must be an instance of {{:#type}}",
|
|
54
|
-
"object.length": "{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
55
|
-
"object.max": "{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
56
|
-
"object.min": "{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
57
|
-
"object.missing": "{{#label}} must contain at least one of {{#peersWithLabels}}",
|
|
58
|
-
"object.nand": "{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}",
|
|
59
|
-
"object.oxor": "{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}",
|
|
60
|
-
"object.pattern.match": "{{#label}} keys failed to match pattern requirements",
|
|
61
|
-
"object.refType": "{{#label}} must be a Joi reference",
|
|
62
|
-
"object.regex": "{{#label}} must be a RegExp object",
|
|
63
|
-
"object.rename.multiple": "{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}",
|
|
64
|
-
"object.rename.override": "{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists",
|
|
65
|
-
"object.schema": "{{#label}} must be a Joi schema of {{#type}} type",
|
|
66
|
-
"object.unknown": "{{#label}} is not allowed",
|
|
67
|
-
"object.with": "{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}",
|
|
68
|
-
"object.without": "{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}",
|
|
69
|
-
"object.xor": "{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}",
|
|
70
|
-
"number.base": "{{#label}} must be a number",
|
|
71
|
-
"number.greater": "{{#label}} must be greater than {{#limit}}",
|
|
72
|
-
"number.infinity": "{{#label}} cannot be infinity",
|
|
73
|
-
"number.integer": "{{#label}} must be an integer",
|
|
74
|
-
"number.less": "{{#label}} must be less than {{#limit}}",
|
|
75
|
-
"number.max": "{{#label}} must be less than or equal to {{#limit}}",
|
|
76
|
-
"number.min": "{{#label}} must be greater than or equal to {{#limit}}",
|
|
77
|
-
"number.multiple": "{{#label}} must be a multiple of {{#multiple}}",
|
|
78
|
-
"number.negative": "{{#label}} must be a negative number",
|
|
79
|
-
"number.port": "{{#label}} must be a valid port",
|
|
80
|
-
"number.positive": "{{#label}} must be a positive number",
|
|
81
|
-
"number.precision": "{{#label}} must have no more than {{#limit}} decimal places",
|
|
82
|
-
"number.unsafe": "{{#label}} must be a safe number",
|
|
83
|
-
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
-
"string.base": "{{#label}} must be a string",
|
|
85
|
-
"string.base64": "{{#label}} must be a valid base64 string",
|
|
86
|
-
"string.creditCard": "{{#label}} must be a credit card",
|
|
87
|
-
"string.dataUri": "{{#label}} must be a valid dataUri string",
|
|
88
|
-
"string.domain": "{{#label}} must contain a valid domain name",
|
|
89
|
-
"string.email": "{{#label}} must be a valid email",
|
|
90
|
-
"string.empty": "{{#label}} is not allowed to be empty",
|
|
91
|
-
"string.guid": "{{#label}} must be a valid GUID",
|
|
92
|
-
"string.hex": "{{#label}} must only contain hexadecimal characters",
|
|
93
|
-
"string.hexAlign": "{{#label}} hex decoded representation must be byte aligned",
|
|
94
|
-
"string.hostname": "{{#label}} must be a valid hostname",
|
|
95
|
-
"string.ip": "{{#label}} must be a valid ip address with a {{#cidr}} CIDR",
|
|
96
|
-
"string.ipVersion": "{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR",
|
|
97
|
-
"string.isoDate": "{{#label}} must be in iso format",
|
|
98
|
-
"string.isoDuration": "{{#label}} must be a valid ISO 8601 duration",
|
|
99
|
-
"string.length": "{{#label}} length must be {{#limit}} characters long",
|
|
100
|
-
"string.lowercase": "{{#label}} must only contain lowercase characters",
|
|
101
|
-
"string.max": "{{#label}} length must be less than or equal to {{#limit}} characters long",
|
|
102
|
-
"string.min": "{{#label}} length must be at least {{#limit}} characters long",
|
|
103
|
-
"string.normalize": "{{#label}} must be unicode normalized in the {{#form}} form",
|
|
104
|
-
"string.token": "{{#label}} must only contain alpha-numeric and underscore characters",
|
|
105
|
-
"string.pattern.base": "{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}",
|
|
106
|
-
"string.pattern.name": "{{#label}} with value {:[.]} fails to match the {{#name}} pattern",
|
|
107
|
-
"string.pattern.invert.base": "{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}",
|
|
108
|
-
"string.pattern.invert.name": "{{#label}} with value {:[.]} matches the inverted {{#name}} pattern",
|
|
109
|
-
"string.trim": "{{#label}} must not have leading or trailing whitespace",
|
|
110
|
-
"string.uri": "{{#label}} must be a valid uri",
|
|
111
|
-
"string.uriCustomScheme": "{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern",
|
|
112
|
-
"string.uriRelativeOnly": "{{#label}} must be a valid relative uri",
|
|
113
|
-
"string.uppercase": "{{#label}} must only contain uppercase characters",
|
|
114
|
-
"symbol.base": "{{#label}} must be a symbol",
|
|
115
|
-
"symbol.map": "{{#label}} must be one of {{#map}}"
|
|
116
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"alternatives.all": "{{#label}} does not match all of the required types",
|
|
3
|
+
"alternatives.any": "{{#label}} does not match any of the allowed types",
|
|
4
|
+
"alternatives.match": "{{#label}} does not match any of the allowed types",
|
|
5
|
+
"alternatives.one": "{{#label}} matches more than one allowed type",
|
|
6
|
+
"alternatives.types": "{{#label}} must be one of {{#types}}",
|
|
7
|
+
"any.custom": "{{#label}} failed custom validation because {{#error.message}}",
|
|
8
|
+
"any.default": "{{#label}} threw an error when running default method",
|
|
9
|
+
"any.failover": "{{#label}} threw an error when running failover method",
|
|
10
|
+
"any.invalid": "{{#label}} contains an invalid value",
|
|
11
|
+
"any.only": "{{#label}} must be {if(#valids.length == 1, \"\", \"one of \")}{{#valids}}",
|
|
12
|
+
"any.ref": "{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}",
|
|
13
|
+
"any.required": "{{#label}} is required",
|
|
14
|
+
"any.unknown": "{{#label}} is not allowed",
|
|
15
|
+
"array.base": "{{#label}} must be an array",
|
|
16
|
+
"array.excludes": "{{#label}} contains an excluded value",
|
|
17
|
+
"array.hasKnown": "{{#label}} does not contain at least one required match for type {:#patternLabel}",
|
|
18
|
+
"array.hasUnknown": "{{#label}} does not contain at least one required match",
|
|
19
|
+
"array.includes": "{{#label}} does not match any of the allowed types",
|
|
20
|
+
"array.includesRequiredBoth": "{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)",
|
|
21
|
+
"array.includesRequiredKnowns": "{{#label}} does not contain {{#knownMisses}}",
|
|
22
|
+
"array.includesRequiredUnknowns": "{{#label}} does not contain {{#unknownMisses}} required value(s)",
|
|
23
|
+
"array.length": "{{#label}} must contain {{#limit}} items",
|
|
24
|
+
"array.max": "{{#label}} must contain less than or equal to {{#limit}} items",
|
|
25
|
+
"array.min": "{{#label}} must contain at least {{#limit}} items",
|
|
26
|
+
"array.orderedLength": "{{#label}} must contain at most {{#limit}} items",
|
|
27
|
+
"array.sort": "{{#label}} must be sorted in {#order} order by {{#by}}",
|
|
28
|
+
"array.sort.mismatching": "{{#label}} cannot be sorted due to mismatching types",
|
|
29
|
+
"array.sort.unsupported": "{{#label}} cannot be sorted due to unsupported type {#type}",
|
|
30
|
+
"array.sparse": "{{#label}} must not be a sparse array item",
|
|
31
|
+
"array.unique": "{{#label}} contains a duplicate value",
|
|
32
|
+
"binary.base": "{{#label}} must be a buffer or a string",
|
|
33
|
+
"binary.length": "{{#label}} must be {{#limit}} bytes",
|
|
34
|
+
"binary.max": "{{#label}} must be less than or equal to {{#limit}} bytes",
|
|
35
|
+
"binary.min": "{{#label}} must be at least {{#limit}} bytes",
|
|
36
|
+
"boolean.base": "{{#label}} must be a boolean",
|
|
37
|
+
"date.base": "{{#label}} must be a valid date",
|
|
38
|
+
"date.format": "{{#label}} must be in {msg(\"date.format.\" + #format) || #format} format",
|
|
39
|
+
"date.greater": "{{#label}} must be greater than {{:#limit}}",
|
|
40
|
+
"date.less": "{{#label}} must be less than {{:#limit}}",
|
|
41
|
+
"date.max": "{{#label}} must be less than or equal to {{:#limit}}",
|
|
42
|
+
"date.min": "{{#label}} must be greater than or equal to {{:#limit}}",
|
|
43
|
+
"date.format.iso": "ISO 8601 date",
|
|
44
|
+
"date.format.javascript": "timestamp or number of milliseconds",
|
|
45
|
+
"date.format.unix": "timestamp or number of seconds",
|
|
46
|
+
"function.arity": "{{#label}} must have an arity of {{#n}}",
|
|
47
|
+
"function.class": "{{#label}} must be a class",
|
|
48
|
+
"function.maxArity": "{{#label}} must have an arity lesser or equal to {{#n}}",
|
|
49
|
+
"function.minArity": "{{#label}} must have an arity greater or equal to {{#n}}",
|
|
50
|
+
"object.and": "{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}",
|
|
51
|
+
"object.assert": "{{#label}} is invalid because {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
+
"object.base": "{{#label}} must be of type {{#type}}",
|
|
53
|
+
"object.instance": "{{#label}} must be an instance of {{:#type}}",
|
|
54
|
+
"object.length": "{{#label}} must have {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
55
|
+
"object.max": "{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
56
|
+
"object.min": "{{#label}} must have at least {{#limit}} key{if(#limit == 1, \"\", \"s\")}",
|
|
57
|
+
"object.missing": "{{#label}} must contain at least one of {{#peersWithLabels}}",
|
|
58
|
+
"object.nand": "{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}",
|
|
59
|
+
"object.oxor": "{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}",
|
|
60
|
+
"object.pattern.match": "{{#label}} keys failed to match pattern requirements",
|
|
61
|
+
"object.refType": "{{#label}} must be a Joi reference",
|
|
62
|
+
"object.regex": "{{#label}} must be a RegExp object",
|
|
63
|
+
"object.rename.multiple": "{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}",
|
|
64
|
+
"object.rename.override": "{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists",
|
|
65
|
+
"object.schema": "{{#label}} must be a Joi schema of {{#type}} type",
|
|
66
|
+
"object.unknown": "{{#label}} is not allowed",
|
|
67
|
+
"object.with": "{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}",
|
|
68
|
+
"object.without": "{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}",
|
|
69
|
+
"object.xor": "{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}",
|
|
70
|
+
"number.base": "{{#label}} must be a number",
|
|
71
|
+
"number.greater": "{{#label}} must be greater than {{#limit}}",
|
|
72
|
+
"number.infinity": "{{#label}} cannot be infinity",
|
|
73
|
+
"number.integer": "{{#label}} must be an integer",
|
|
74
|
+
"number.less": "{{#label}} must be less than {{#limit}}",
|
|
75
|
+
"number.max": "{{#label}} must be less than or equal to {{#limit}}",
|
|
76
|
+
"number.min": "{{#label}} must be greater than or equal to {{#limit}}",
|
|
77
|
+
"number.multiple": "{{#label}} must be a multiple of {{#multiple}}",
|
|
78
|
+
"number.negative": "{{#label}} must be a negative number",
|
|
79
|
+
"number.port": "{{#label}} must be a valid port",
|
|
80
|
+
"number.positive": "{{#label}} must be a positive number",
|
|
81
|
+
"number.precision": "{{#label}} must have no more than {{#limit}} decimal places",
|
|
82
|
+
"number.unsafe": "{{#label}} must be a safe number",
|
|
83
|
+
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
+
"string.base": "{{#label}} must be a string",
|
|
85
|
+
"string.base64": "{{#label}} must be a valid base64 string",
|
|
86
|
+
"string.creditCard": "{{#label}} must be a credit card",
|
|
87
|
+
"string.dataUri": "{{#label}} must be a valid dataUri string",
|
|
88
|
+
"string.domain": "{{#label}} must contain a valid domain name",
|
|
89
|
+
"string.email": "{{#label}} must be a valid email",
|
|
90
|
+
"string.empty": "{{#label}} is not allowed to be empty",
|
|
91
|
+
"string.guid": "{{#label}} must be a valid GUID",
|
|
92
|
+
"string.hex": "{{#label}} must only contain hexadecimal characters",
|
|
93
|
+
"string.hexAlign": "{{#label}} hex decoded representation must be byte aligned",
|
|
94
|
+
"string.hostname": "{{#label}} must be a valid hostname",
|
|
95
|
+
"string.ip": "{{#label}} must be a valid ip address with a {{#cidr}} CIDR",
|
|
96
|
+
"string.ipVersion": "{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR",
|
|
97
|
+
"string.isoDate": "{{#label}} must be in iso format",
|
|
98
|
+
"string.isoDuration": "{{#label}} must be a valid ISO 8601 duration",
|
|
99
|
+
"string.length": "{{#label}} length must be {{#limit}} characters long",
|
|
100
|
+
"string.lowercase": "{{#label}} must only contain lowercase characters",
|
|
101
|
+
"string.max": "{{#label}} length must be less than or equal to {{#limit}} characters long",
|
|
102
|
+
"string.min": "{{#label}} length must be at least {{#limit}} characters long",
|
|
103
|
+
"string.normalize": "{{#label}} must be unicode normalized in the {{#form}} form",
|
|
104
|
+
"string.token": "{{#label}} must only contain alpha-numeric and underscore characters",
|
|
105
|
+
"string.pattern.base": "{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}",
|
|
106
|
+
"string.pattern.name": "{{#label}} with value {:[.]} fails to match the {{#name}} pattern",
|
|
107
|
+
"string.pattern.invert.base": "{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}",
|
|
108
|
+
"string.pattern.invert.name": "{{#label}} with value {:[.]} matches the inverted {{#name}} pattern",
|
|
109
|
+
"string.trim": "{{#label}} must not have leading or trailing whitespace",
|
|
110
|
+
"string.uri": "{{#label}} must be a valid uri",
|
|
111
|
+
"string.uriCustomScheme": "{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern",
|
|
112
|
+
"string.uriRelativeOnly": "{{#label}} must be a valid relative uri",
|
|
113
|
+
"string.uppercase": "{{#label}} must only contain uppercase characters",
|
|
114
|
+
"symbol.base": "{{#label}} must be a symbol",
|
|
115
|
+
"symbol.map": "{{#label}} must be one of {{#map}}"
|
|
116
|
+
}
|
package/locales/zh_CN.json
CHANGED
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
{
|
|
2
|
-
"alternatives.all": "{{#label}} 不能匹配上所以可选项",
|
|
3
|
-
"alternatives.any": "{{#label}} 不能匹配上任何可选项",
|
|
4
|
-
"alternatives.match": "{{#label}} 不能匹配上任何可选项",
|
|
5
|
-
"alternatives.one": "{{#label}} 匹配超过一个可选项",
|
|
6
|
-
"alternatives.types": "{{#label}} 必须是 {{#types}}",
|
|
7
|
-
"any.custom": "{{#label}} 自定义校验失败,原因为 {{#error.message}}",
|
|
8
|
-
"any.default": "{{#label}} 运行默认函数时出错",
|
|
9
|
-
"any.failover": "{{#label}} 运行 failover 函数时出错",
|
|
10
|
-
"any.invalid": "{{#label}} 不是可选值",
|
|
11
|
-
"any.only": "{{#label}} 必须是 {{#valids}} {if(#valids.length == 1, \"\", \"中的一个\")}",
|
|
12
|
-
"any.ref": "{{#label}} {{#arg}} 引用 {{:#ref}} 其中 {{#reason}}",
|
|
13
|
-
"any.required": "{{#label}} 不能为空",
|
|
14
|
-
"any.unknown": "{{#label}} 参数错误",
|
|
15
|
-
"array.base": "{{#label}} 必须是数组",
|
|
16
|
-
"array.excludes": "{{#label}} 包含非法的值",
|
|
17
|
-
"array.hasKnown": "{{#label}} 中至少一个类型为 {:#patternLabel} 的选项",
|
|
18
|
-
"array.hasUnknown": "{{#label}} 中至少有一个选项",
|
|
19
|
-
"array.includes": "{{#label}} 不能匹配任何可选项",
|
|
20
|
-
"array.includesRequiredBoth": "{{#label}} 不包含 {{#knownMisses}} 及 {{#unknownMisses}} 个必选项",
|
|
21
|
-
"array.includesRequiredKnowns": "{{#label}} 不包含 {{#knownMisses}} 等必选项",
|
|
22
|
-
"array.includesRequiredUnknowns": "{{#label}} 不包含 {{#unknownMisses}} 个必选项",
|
|
23
|
-
"array.length": "{{#label}} 必须正好包含 {{#limit}} 个成员",
|
|
24
|
-
"array.max": "{{#label}} 最多包含 {{#limit}} 个成员",
|
|
25
|
-
"array.min": "{{#label}} 至少包含 {{#limit}} 个成员",
|
|
26
|
-
"array.orderedLength": "{{#label}} 必须至少包含 {{#limit}} 个成员",
|
|
27
|
-
"array.sort": "{{#label}} 必须按 {#order} 顺序按 {{#by}} 排序",
|
|
28
|
-
"array.sort.mismatching": "{{#label}} 由于类型不匹配而无法排序",
|
|
29
|
-
"array.sort.unsupported": "{{#label}} 类型 {#type} 不支持排序",
|
|
30
|
-
"array.sparse": "{{#label}} 不能包含未定义成员",
|
|
31
|
-
"array.unique": "{{#label}} 是重复的成员",
|
|
32
|
-
"binary.base": "{{#label}} 必须是一段内容",
|
|
33
|
-
"binary.length": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
34
|
-
"binary.max": "{{#label}} 最多包含 {{#limit}} 个字节",
|
|
35
|
-
"binary.min": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
36
|
-
"boolean.base": "{{#label}} 必须是 bool 值",
|
|
37
|
-
"date.base": "{{#label}} 必须是毫秒数或者有效的时间字符串",
|
|
38
|
-
"date.format": "{{#label}} 必须是以下格式的字符串 {msg(\"date.format.\" + #format) || #format}",
|
|
39
|
-
"date.greater": "{{#label}} 必须晚于 {{:#limit}}",
|
|
40
|
-
"date.less": "{{#label}} 必须早于 {{:#limit}}",
|
|
41
|
-
"date.max": "{{#label}} 必须早于 {{:#limit}}",
|
|
42
|
-
"date.min": "{{#label}} 必须晚于 {{:#limit}}",
|
|
43
|
-
"date.format.iso": "必须是有效的\"ISO 8601\"格式的时间",
|
|
44
|
-
"date.format.javascript": "必须是有效的时间戳或者毫秒数",
|
|
45
|
-
"date.format.unix": "必须是有效的时间戳或者秒数",
|
|
46
|
-
"function.arity": "{{#label}} 必须正好拥有 {{#n}} 个参数",
|
|
47
|
-
"function.class": "{{#label}} 必须是对象类",
|
|
48
|
-
"function.maxArity": "{{#label}} 必须最多拥有 {{#n}} 个参数",
|
|
49
|
-
"function.minArity": "{{#label}} 必须至少拥有 {{#n}} 个参数",
|
|
50
|
-
"object.and": "{{#label}} 当前 {{#presentWithLabels}} 需要有对应的 {{#missingWithLabels}}",
|
|
51
|
-
"object.assert": "{{#label}} 无效,原因为 {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
-
"object.base": "{{#label}} 必须是一个对象 {{#type}}",
|
|
53
|
-
"object.instance": "{{#label}} 必须是一个 {{:#type}} 的实例",
|
|
54
|
-
"object.length": "{{#label}} 必须正好包含 {{#limit}} 个子对象",
|
|
55
|
-
"object.max": "{{#label}} 最多包含 {{#limit}} 个子对象",
|
|
56
|
-
"object.min": "{{#label}} 至少包含 {{#limit}} 个子对象",
|
|
57
|
-
"object.missing": "{{#label}} 没有对应的 {{#peersWithLabels}}",
|
|
58
|
-
"object.nand": "{{:#mainWithLabel}} 不得与 {{#peersWithLabels}} 同时存在",
|
|
59
|
-
"object.oxor": "{{#label}} 和 {{#peerWithLabels}} 有冲突",
|
|
60
|
-
"object.pattern.match": "{{#label}} 键匹配失败",
|
|
61
|
-
"object.refType": "{{#label}} 必须是 Joi 引用",
|
|
62
|
-
"object.regex": "{{#label}} 必须是正则对象",
|
|
63
|
-
"object.rename.multiple": "{{#label}} 无法重命名 {{:#from}} 因为多次重命名被禁用并且另一个键已经重命名为 {{:#to}}",
|
|
64
|
-
"object.rename.override": "{{#label}} 无法重命名 {{:#from}} 因为覆盖被禁用并且目标 {{:#to}} 存在",
|
|
65
|
-
"object.schema": "{{#label}} 必须是 {{#type}} 类型的 Joi Schema",
|
|
66
|
-
"object.unknown": "{{#label}} 不被允许",
|
|
67
|
-
"object.with": "{{:#mainWithLabel}} 缺少必需的对等方 {{:#peerWithLabel}}",
|
|
68
|
-
"object.without": "{{:#mainWithLabel}} 与禁止的节点冲突 {{:#peerWithLabel}}",
|
|
69
|
-
"object.xor": "{{#label}} 包含独占对等体之间的冲突 {{#peersWithLabels}}",
|
|
70
|
-
"number.base": "{{#label}} 必须是数值",
|
|
71
|
-
"number.greater": "{{#label}} 必须大于 {{#limit}}",
|
|
72
|
-
"number.infinity": "{{#label}} 不能是无穷大",
|
|
73
|
-
"number.integer": "{{#label}} 必须是整数",
|
|
74
|
-
"number.less": "{{#label}} 必须小于 {{#limit}}",
|
|
75
|
-
"number.max": "{{#label}} 必须小于或等于 {{#limit}}",
|
|
76
|
-
"number.min": "{{#label}} 必须大于或等于 {{#limit}}",
|
|
77
|
-
"number.multiple": "{{#label}} 必须是 {{#multiple}} 的倍数",
|
|
78
|
-
"number.negative": "{{#label}} 必须是负数",
|
|
79
|
-
"number.port": "{{#label}} 必须是有效的端口号",
|
|
80
|
-
"number.positive": "{{#label}} 必须是正数",
|
|
81
|
-
"number.precision": "{{#label}} 必须有 {{#limit}} 位小数",
|
|
82
|
-
"number.unsafe": "{{#label}} 必须是安全号码",
|
|
83
|
-
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
-
"string.base": "{{#label}} 必须是字符串",
|
|
85
|
-
"string.base64": "{{#label}} 必须是有效的 base64 字符串",
|
|
86
|
-
"string.creditCard": "{{#label}} 必须是有效的信用卡号",
|
|
87
|
-
"string.dataUri": "{{#label}} 必须是有效的 dataUri 字符串",
|
|
88
|
-
"string.domain": "{{#label}} 必须包含有效的域名",
|
|
89
|
-
"string.email": "{{#label}} 必须是有效的电子邮件",
|
|
90
|
-
"string.empty": "{{#label}} 不能为空",
|
|
91
|
-
"string.guid": "{{#label}} 必须是有效的 GUID",
|
|
92
|
-
"string.hex": "{{#label}} 只能包含十六进制字符",
|
|
93
|
-
"string.hexAlign": "{{#label}} 十六进制解码表示必须字节对齐",
|
|
94
|
-
"string.hostname": "{{#label}} 必须是有效的主机名",
|
|
95
|
-
"string.ip": "{{#label}} 必须是具有 {{#cidr}} CIDR 的有效 IP 地址",
|
|
96
|
-
"string.ipVersion": "{{#label}} 必须是以下版本之一的有效 IP 地址 {{#version}} 和 {{#cidr}} CIDR",
|
|
97
|
-
"string.isoDate": "{{#label}} 必须是 iso 格式",
|
|
98
|
-
"string.isoDuration": "{{#label}} 必须是有效的 ISO 8601 持续时间",
|
|
99
|
-
"string.length": "{{#label}} 长度必须为 {{#limit}} 个字符长",
|
|
100
|
-
"string.lowercase": "{{#label}} 只能包含小写字符",
|
|
101
|
-
"string.max": "{{#label}} 长度必须小于或等于 {{#limit}} 个字符长",
|
|
102
|
-
"string.min": "{{#label}} 长度必须至少为 {{#limit}} 个字符长",
|
|
103
|
-
"string.normalize": "{{#label}} 必须以 {{#form}} 形式进行 unicode 规范化",
|
|
104
|
-
"string.token": "{{#label}} 只能包含字母数字和下划线字符",
|
|
105
|
-
"string.pattern.base": "{{#label}} 的值为 {:[.]} 未能匹配所需的模式:{{#regex}}",
|
|
106
|
-
"string.pattern.name": "{{#label}} 值为 {:[.]} 未能匹配 {{#name}} 模式",
|
|
107
|
-
"string.pattern.invert.base": "{{#label}} 与值 {:[.]} 匹配反转模式:{{#regex}}",
|
|
108
|
-
"string.pattern.invert.name": "{{#label}} 与值 {:[.]} 匹配倒置的 {{#name}} 模式",
|
|
109
|
-
"string.trim": "{{#label}} 不得前后空格",
|
|
110
|
-
"string.uri": "{{#label}} 必须是有效的 uri",
|
|
111
|
-
"string.uriCustomScheme": "{{#label}} 必须是有效的 uri,其方案与 {{#scheme}} 模式匹配",
|
|
112
|
-
"string.uriRelativeOnly": "{{#label}} 必须是有效的相对 uri",
|
|
113
|
-
"string.uppercase": "{{#label}} 只能包含大写字符",
|
|
114
|
-
"symbol.base": "{{#label}} 必须是符号",
|
|
115
|
-
"symbol.map": "{{#label}} 必须是 {{#map}} 之一"
|
|
116
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"alternatives.all": "{{#label}} 不能匹配上所以可选项",
|
|
3
|
+
"alternatives.any": "{{#label}} 不能匹配上任何可选项",
|
|
4
|
+
"alternatives.match": "{{#label}} 不能匹配上任何可选项",
|
|
5
|
+
"alternatives.one": "{{#label}} 匹配超过一个可选项",
|
|
6
|
+
"alternatives.types": "{{#label}} 必须是 {{#types}}",
|
|
7
|
+
"any.custom": "{{#label}} 自定义校验失败,原因为 {{#error.message}}",
|
|
8
|
+
"any.default": "{{#label}} 运行默认函数时出错",
|
|
9
|
+
"any.failover": "{{#label}} 运行 failover 函数时出错",
|
|
10
|
+
"any.invalid": "{{#label}} 不是可选值",
|
|
11
|
+
"any.only": "{{#label}} 必须是 {{#valids}} {if(#valids.length == 1, \"\", \"中的一个\")}",
|
|
12
|
+
"any.ref": "{{#label}} {{#arg}} 引用 {{:#ref}} 其中 {{#reason}}",
|
|
13
|
+
"any.required": "{{#label}} 不能为空",
|
|
14
|
+
"any.unknown": "{{#label}} 参数错误",
|
|
15
|
+
"array.base": "{{#label}} 必须是数组",
|
|
16
|
+
"array.excludes": "{{#label}} 包含非法的值",
|
|
17
|
+
"array.hasKnown": "{{#label}} 中至少一个类型为 {:#patternLabel} 的选项",
|
|
18
|
+
"array.hasUnknown": "{{#label}} 中至少有一个选项",
|
|
19
|
+
"array.includes": "{{#label}} 不能匹配任何可选项",
|
|
20
|
+
"array.includesRequiredBoth": "{{#label}} 不包含 {{#knownMisses}} 及 {{#unknownMisses}} 个必选项",
|
|
21
|
+
"array.includesRequiredKnowns": "{{#label}} 不包含 {{#knownMisses}} 等必选项",
|
|
22
|
+
"array.includesRequiredUnknowns": "{{#label}} 不包含 {{#unknownMisses}} 个必选项",
|
|
23
|
+
"array.length": "{{#label}} 必须正好包含 {{#limit}} 个成员",
|
|
24
|
+
"array.max": "{{#label}} 最多包含 {{#limit}} 个成员",
|
|
25
|
+
"array.min": "{{#label}} 至少包含 {{#limit}} 个成员",
|
|
26
|
+
"array.orderedLength": "{{#label}} 必须至少包含 {{#limit}} 个成员",
|
|
27
|
+
"array.sort": "{{#label}} 必须按 {#order} 顺序按 {{#by}} 排序",
|
|
28
|
+
"array.sort.mismatching": "{{#label}} 由于类型不匹配而无法排序",
|
|
29
|
+
"array.sort.unsupported": "{{#label}} 类型 {#type} 不支持排序",
|
|
30
|
+
"array.sparse": "{{#label}} 不能包含未定义成员",
|
|
31
|
+
"array.unique": "{{#label}} 是重复的成员",
|
|
32
|
+
"binary.base": "{{#label}} 必须是一段内容",
|
|
33
|
+
"binary.length": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
34
|
+
"binary.max": "{{#label}} 最多包含 {{#limit}} 个字节",
|
|
35
|
+
"binary.min": "{{#label}} 至少包含 {{#limit}} 个字节",
|
|
36
|
+
"boolean.base": "{{#label}} 必须是 bool 值",
|
|
37
|
+
"date.base": "{{#label}} 必须是毫秒数或者有效的时间字符串",
|
|
38
|
+
"date.format": "{{#label}} 必须是以下格式的字符串 {msg(\"date.format.\" + #format) || #format}",
|
|
39
|
+
"date.greater": "{{#label}} 必须晚于 {{:#limit}}",
|
|
40
|
+
"date.less": "{{#label}} 必须早于 {{:#limit}}",
|
|
41
|
+
"date.max": "{{#label}} 必须早于 {{:#limit}}",
|
|
42
|
+
"date.min": "{{#label}} 必须晚于 {{:#limit}}",
|
|
43
|
+
"date.format.iso": "必须是有效的\"ISO 8601\"格式的时间",
|
|
44
|
+
"date.format.javascript": "必须是有效的时间戳或者毫秒数",
|
|
45
|
+
"date.format.unix": "必须是有效的时间戳或者秒数",
|
|
46
|
+
"function.arity": "{{#label}} 必须正好拥有 {{#n}} 个参数",
|
|
47
|
+
"function.class": "{{#label}} 必须是对象类",
|
|
48
|
+
"function.maxArity": "{{#label}} 必须最多拥有 {{#n}} 个参数",
|
|
49
|
+
"function.minArity": "{{#label}} 必须至少拥有 {{#n}} 个参数",
|
|
50
|
+
"object.and": "{{#label}} 当前 {{#presentWithLabels}} 需要有对应的 {{#missingWithLabels}}",
|
|
51
|
+
"object.assert": "{{#label}} 无效,原因为 {if(#subject.key, `\"` + #subject.key + `\" failed to ` + (#message || \"pass the assertion test\"), #message || \"the assertion failed\")}",
|
|
52
|
+
"object.base": "{{#label}} 必须是一个对象 {{#type}}",
|
|
53
|
+
"object.instance": "{{#label}} 必须是一个 {{:#type}} 的实例",
|
|
54
|
+
"object.length": "{{#label}} 必须正好包含 {{#limit}} 个子对象",
|
|
55
|
+
"object.max": "{{#label}} 最多包含 {{#limit}} 个子对象",
|
|
56
|
+
"object.min": "{{#label}} 至少包含 {{#limit}} 个子对象",
|
|
57
|
+
"object.missing": "{{#label}} 没有对应的 {{#peersWithLabels}}",
|
|
58
|
+
"object.nand": "{{:#mainWithLabel}} 不得与 {{#peersWithLabels}} 同时存在",
|
|
59
|
+
"object.oxor": "{{#label}} 和 {{#peerWithLabels}} 有冲突",
|
|
60
|
+
"object.pattern.match": "{{#label}} 键匹配失败",
|
|
61
|
+
"object.refType": "{{#label}} 必须是 Joi 引用",
|
|
62
|
+
"object.regex": "{{#label}} 必须是正则对象",
|
|
63
|
+
"object.rename.multiple": "{{#label}} 无法重命名 {{:#from}} 因为多次重命名被禁用并且另一个键已经重命名为 {{:#to}}",
|
|
64
|
+
"object.rename.override": "{{#label}} 无法重命名 {{:#from}} 因为覆盖被禁用并且目标 {{:#to}} 存在",
|
|
65
|
+
"object.schema": "{{#label}} 必须是 {{#type}} 类型的 Joi Schema",
|
|
66
|
+
"object.unknown": "{{#label}} 不被允许",
|
|
67
|
+
"object.with": "{{:#mainWithLabel}} 缺少必需的对等方 {{:#peerWithLabel}}",
|
|
68
|
+
"object.without": "{{:#mainWithLabel}} 与禁止的节点冲突 {{:#peerWithLabel}}",
|
|
69
|
+
"object.xor": "{{#label}} 包含独占对等体之间的冲突 {{#peersWithLabels}}",
|
|
70
|
+
"number.base": "{{#label}} 必须是数值",
|
|
71
|
+
"number.greater": "{{#label}} 必须大于 {{#limit}}",
|
|
72
|
+
"number.infinity": "{{#label}} 不能是无穷大",
|
|
73
|
+
"number.integer": "{{#label}} 必须是整数",
|
|
74
|
+
"number.less": "{{#label}} 必须小于 {{#limit}}",
|
|
75
|
+
"number.max": "{{#label}} 必须小于或等于 {{#limit}}",
|
|
76
|
+
"number.min": "{{#label}} 必须大于或等于 {{#limit}}",
|
|
77
|
+
"number.multiple": "{{#label}} 必须是 {{#multiple}} 的倍数",
|
|
78
|
+
"number.negative": "{{#label}} 必须是负数",
|
|
79
|
+
"number.port": "{{#label}} 必须是有效的端口号",
|
|
80
|
+
"number.positive": "{{#label}} 必须是正数",
|
|
81
|
+
"number.precision": "{{#label}} 必须有 {{#limit}} 位小数",
|
|
82
|
+
"number.unsafe": "{{#label}} 必须是安全号码",
|
|
83
|
+
"string.alphanum": "{{#label}} must only contain alpha-numeric characters",
|
|
84
|
+
"string.base": "{{#label}} 必须是字符串",
|
|
85
|
+
"string.base64": "{{#label}} 必须是有效的 base64 字符串",
|
|
86
|
+
"string.creditCard": "{{#label}} 必须是有效的信用卡号",
|
|
87
|
+
"string.dataUri": "{{#label}} 必须是有效的 dataUri 字符串",
|
|
88
|
+
"string.domain": "{{#label}} 必须包含有效的域名",
|
|
89
|
+
"string.email": "{{#label}} 必须是有效的电子邮件",
|
|
90
|
+
"string.empty": "{{#label}} 不能为空",
|
|
91
|
+
"string.guid": "{{#label}} 必须是有效的 GUID",
|
|
92
|
+
"string.hex": "{{#label}} 只能包含十六进制字符",
|
|
93
|
+
"string.hexAlign": "{{#label}} 十六进制解码表示必须字节对齐",
|
|
94
|
+
"string.hostname": "{{#label}} 必须是有效的主机名",
|
|
95
|
+
"string.ip": "{{#label}} 必须是具有 {{#cidr}} CIDR 的有效 IP 地址",
|
|
96
|
+
"string.ipVersion": "{{#label}} 必须是以下版本之一的有效 IP 地址 {{#version}} 和 {{#cidr}} CIDR",
|
|
97
|
+
"string.isoDate": "{{#label}} 必须是 iso 格式",
|
|
98
|
+
"string.isoDuration": "{{#label}} 必须是有效的 ISO 8601 持续时间",
|
|
99
|
+
"string.length": "{{#label}} 长度必须为 {{#limit}} 个字符长",
|
|
100
|
+
"string.lowercase": "{{#label}} 只能包含小写字符",
|
|
101
|
+
"string.max": "{{#label}} 长度必须小于或等于 {{#limit}} 个字符长",
|
|
102
|
+
"string.min": "{{#label}} 长度必须至少为 {{#limit}} 个字符长",
|
|
103
|
+
"string.normalize": "{{#label}} 必须以 {{#form}} 形式进行 unicode 规范化",
|
|
104
|
+
"string.token": "{{#label}} 只能包含字母数字和下划线字符",
|
|
105
|
+
"string.pattern.base": "{{#label}} 的值为 {:[.]} 未能匹配所需的模式:{{#regex}}",
|
|
106
|
+
"string.pattern.name": "{{#label}} 值为 {:[.]} 未能匹配 {{#name}} 模式",
|
|
107
|
+
"string.pattern.invert.base": "{{#label}} 与值 {:[.]} 匹配反转模式:{{#regex}}",
|
|
108
|
+
"string.pattern.invert.name": "{{#label}} 与值 {:[.]} 匹配倒置的 {{#name}} 模式",
|
|
109
|
+
"string.trim": "{{#label}} 不得前后空格",
|
|
110
|
+
"string.uri": "{{#label}} 必须是有效的 uri",
|
|
111
|
+
"string.uriCustomScheme": "{{#label}} 必须是有效的 uri,其方案与 {{#scheme}} 模式匹配",
|
|
112
|
+
"string.uriRelativeOnly": "{{#label}} 必须是有效的相对 uri",
|
|
113
|
+
"string.uppercase": "{{#label}} 只能包含大写字符",
|
|
114
|
+
"symbol.base": "{{#label}} 必须是符号",
|
|
115
|
+
"symbol.map": "{{#label}} 必须是 {{#map}} 之一"
|
|
116
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/validator",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.15",
|
|
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.15",
|
|
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": "dcfb11c57b369ac4327e7ca1aa8cb85f95deee28"
|
|
30
30
|
}
|