@anncic-api/validator 3.1.5 → 3.2.2
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 +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a0_0x51e6d1=a0_0x4f9e;function a0_0x4f9e(_0x3c00be,_0x4ea036){const _0x4c6a6e=a0_0x34fc();return a0_0x4f9e=function(_0xa08897,_0x53ef88){_0xa08897=_0xa08897-0x113;let _0x34fce7=_0x4c6a6e[_0xa08897];return _0x34fce7;},a0_0x4f9e(_0x3c00be,_0x4ea036);}(function(_0x26fedf,_0x112b7e){const _0x147c69=a0_0x4f9e,_0x332cda=_0x26fedf();while(!![]){try{const _0x5a43a8=parseInt(_0x147c69(0x127))/0x1*(-parseInt(_0x147c69(0x12a))/0x2)+parseInt(_0x147c69(0x124))/0x3*(-parseInt(_0x147c69(0x129))/0x4)+parseInt(_0x147c69(0x116))/0x5*(-parseInt(_0x147c69(0x11f))/0x6)+parseInt(_0x147c69(0x11d))/0x7*(-parseInt(_0x147c69(0x119))/0x8)+-parseInt(_0x147c69(0x117))/0x9+parseInt(_0x147c69(0x120))/0xa*(-parseInt(_0x147c69(0x11a))/0xb)+parseInt(_0x147c69(0x125))/0xc;if(_0x5a43a8===_0x112b7e)break;else _0x332cda['push'](_0x332cda['shift']());}catch(_0x5b0a4f){_0x332cda['push'](_0x332cda['shift']());}}}(a0_0x34fc,0x1ace7));const a0_0x53ef88=(function(){let _0xac85fe=!![];return function(_0x928f1d,_0x181757){const _0x256619=_0xac85fe?function(){const _0x495981=a0_0x4f9e;if(_0x181757){const _0x5b3655=_0x181757[_0x495981(0x128)](_0x928f1d,arguments);return _0x181757=null,_0x5b3655;}}:function(){};return _0xac85fe=![],_0x256619;};}()),a0_0xa08897=a0_0x53ef88(this,function(){const _0x47db2a=a0_0x4f9e;return a0_0xa08897[_0x47db2a(0x113)]()[_0x47db2a(0x11b)](_0x47db2a(0x118))[_0x47db2a(0x113)]()[_0x47db2a(0x123)](a0_0xa08897)[_0x47db2a(0x11b)](_0x47db2a(0x118));});a0_0xa08897();'use strict';function a0_0x34fc(){const _0x2922f4=['../../locales/zh_CN.json','../../locales/en_US.json','5095MJPCkZ','1020726DQzkOn','(((.+)+)+)+$','8BNskRt','121lfhpej','search','__esModule','1195411gLqewa','default','1194iRRGvz','181640EzzQws','PARAMS','string','constructor','24TgbdRA','10359648qzkKBe','defineProperty','2683vLADKH','apply','23976ygjCxu','14FREAKG','toString'];a0_0x34fc=function(){return _0x2922f4;};return a0_0x34fc();}Object[a0_0x51e6d1(0x126)](exports,a0_0x51e6d1(0x11c),{'value':!![]});const ValidatorError_1=require('../exception/ValidatorError');exports[a0_0x51e6d1(0x11e)]={'validator':{'errorStatus':ValidatorError_1['ValidatorError'][a0_0x51e6d1(0x121)],'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':a0_0x51e6d1(0x122)}},'i18n':{'localeTable':{'en_US':{'validator':require(a0_0x51e6d1(0x115))},'zh_CN':{'validator':require(a0_0x51e6d1(0x114))}}}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a1_0x3f6658=a1_0x11fa;function a1_0x9b1f(){const _0x3fd630=['6zoLWJf','apply','getMethodParamTypes','prototype','371xYtQPy','324MPyypw','method','__decorate','6184XTjFCH','707030otdZsJ','21athotM','43395GvRyMi','function','60viqtVs','Inject','metadata','onReady','defineProperty','Configuration','query','methodName','object','req','getAttr','decorate','__metadata','args','CustomConfiguration','getClassMetadata','toString','length','assign','MidwayDecoratorService','param','search','locale','getSchema','validator','__esModule','methodArgs','constructor','41172SqfFQY','params','find','@midwayjs/i18n','4684yveTCa','@anncic-api/core','./interface','@midwayjs/core','VALIDATOR_KEY','(((.+)+)+)+$','./config/config.default','registerMethodHandler','getOwnPropertyDescriptor','26118TPXNoz','decorator','target','res','21553fGoCos','ValidatorService','design:type','request','anncic-api:validator','./service/ValidatorService','bound\x20dispatch'];a1_0x9b1f=function(){return _0x3fd630;};return a1_0x9b1f();}(function(_0x36ad17,_0x35d3e2){const _0x5a6603=a1_0x11fa,_0x73e2f7=_0x36ad17();while(!![]){try{const _0x1ebcf2=parseInt(_0x5a6603(0xfd))/0x1+-parseInt(_0x5a6603(0xec))/0x2+-parseInt(_0x5a6603(0x10e))/0x3*(-parseInt(_0x5a6603(0xf0))/0x4)+-parseInt(_0x5a6603(0x10d))/0x5*(-parseInt(_0x5a6603(0x104))/0x6)+-parseInt(_0x5a6603(0x108))/0x7*(-parseInt(_0x5a6603(0x10c))/0x8)+-parseInt(_0x5a6603(0xf9))/0x9*(-parseInt(_0x5a6603(0x111))/0xa)+parseInt(_0x5a6603(0x10f))/0xb*(-parseInt(_0x5a6603(0x109))/0xc);if(_0x1ebcf2===_0x35d3e2)break;else _0x73e2f7['push'](_0x73e2f7['shift']());}catch(_0x59ea0e){_0x73e2f7['push'](_0x73e2f7['shift']());}}}(a1_0x9b1f,0x19024));const a1_0x5e5d8f=(function(){let _0x3af43b=!![];return function(_0x28e441,_0x30c1b1){const _0x42705d=_0x3af43b?function(){const _0x20f601=a1_0x11fa;if(_0x30c1b1){const _0x4d4091=_0x30c1b1[_0x20f601(0x105)](_0x28e441,arguments);return _0x30c1b1=null,_0x4d4091;}}:function(){};return _0x3af43b=![],_0x42705d;};}()),a1_0x1b8f64=a1_0x5e5d8f(this,function(){const _0x550df1=a1_0x11fa;return a1_0x1b8f64[_0x550df1(0xe0)]()[_0x550df1(0xe5)](_0x550df1(0xf5))[_0x550df1(0xe0)]()[_0x550df1(0xeb)](a1_0x1b8f64)['search']('(((.+)+)+)+$');});a1_0x1b8f64();'use strict';var __decorate=this&&this[a1_0x3f6658(0x10b)]||function(_0x32ae77,_0x5d8161,_0x35b89d,_0x443cbe){const _0x411ad4=a1_0x3f6658;var _0x784dd3=arguments['length'],_0x527745=_0x784dd3<0x3?_0x5d8161:_0x443cbe===null?_0x443cbe=Object[_0x411ad4(0xf8)](_0x5d8161,_0x35b89d):_0x443cbe,_0x30e2b0;if(typeof Reflect===_0x411ad4(0x119)&&typeof Reflect[_0x411ad4(0xdb)]===_0x411ad4(0x110))_0x527745=Reflect[_0x411ad4(0xdb)](_0x32ae77,_0x5d8161,_0x35b89d,_0x443cbe);else{for(var _0x7e6e1e=_0x32ae77[_0x411ad4(0xe1)]-0x1;_0x7e6e1e>=0x0;_0x7e6e1e--)if(_0x30e2b0=_0x32ae77[_0x7e6e1e])_0x527745=(_0x784dd3<0x3?_0x30e2b0(_0x527745):_0x784dd3>0x3?_0x30e2b0(_0x5d8161,_0x35b89d,_0x527745):_0x30e2b0(_0x5d8161,_0x35b89d))||_0x527745;}return _0x784dd3>0x3&&_0x527745&&Object['defineProperty'](_0x5d8161,_0x35b89d,_0x527745),_0x527745;},__metadata=this&&this[a1_0x3f6658(0xdc)]||function(_0x25b9fb,_0x5b7d2b){const _0x46f258=a1_0x3f6658;if(typeof Reflect==='object'&&typeof Reflect[_0x46f258(0x113)]===_0x46f258(0x110))return Reflect[_0x46f258(0x113)](_0x25b9fb,_0x5b7d2b);};Object[a1_0x3f6658(0x115)](exports,a1_0x3f6658(0xe9),{'value':!![]}),exports[a1_0x3f6658(0xde)]=void 0x0;const i18n_1=require(a1_0x3f6658(0xef)),core_1=require('@midwayjs/core'),core_2=require(a1_0x3f6658(0xf3)),interface_1=require(a1_0x3f6658(0xf2)),ValidatorService_1=require(a1_0x3f6658(0x102)),i18n=require(a1_0x3f6658(0xef)),anncic=require(a1_0x3f6658(0xf1)),ConfigDefault=require(a1_0x3f6658(0xf6));function a1_0x11fa(_0x47bf08,_0x38928e){const _0x33d5b9=a1_0x9b1f();return a1_0x11fa=function(_0x1b8f64,_0x5e5d8f){_0x1b8f64=_0x1b8f64-0xdb;let _0x9b1f59=_0x33d5b9[_0x1b8f64];return _0x9b1f59;},a1_0x11fa(_0x47bf08,_0x38928e);}let CustomConfiguration=exports['CustomConfiguration']=class CustomConfiguration{async[a1_0x3f6658(0x114)](){const _0x23ea37=a1_0x3f6658;this[_0x23ea37(0xfa)][_0x23ea37(0xf7)](interface_1[_0x23ea37(0xf4)],_0x5c358b=>{const _0x513071=_0x23ea37,_0x35ac06=_0x5c358b['metadata'],_0x5c0ca1=(0x0,core_2[_0x513071(0x106)])(_0x5c358b[_0x513071(0xfb)],_0x5c358b['propertyName']);return{'before':_0x3b2b6d=>{const _0x3e00b1=_0x513071;var _0x390a94,_0x542cea,_0x156242,_0x2da818,_0xf9d6e5,_0x2fdaa3,_0x1c0e9f,_0x2fdccd,_0x35d4bb,_0x397dc0,_0x4b3f,_0x430054,_0x135c94;const _0x4acd5b=_0x3b2b6d[_0x3e00b1(0xfb)][core_1['REQUEST_OBJ_CTX_KEY']],_0x156f7f=Object[_0x3e00b1(0xe2)]({},((_0x390a94=_0x4acd5b===null||_0x4acd5b===void 0x0?void 0x0:_0x4acd5b[_0x3e00b1(0x100)])===null||_0x390a94===void 0x0?void 0x0:_0x390a94[_0x3e00b1(0x117)])||{},((_0x542cea=_0x4acd5b===null||_0x4acd5b===void 0x0?void 0x0:_0x4acd5b['request'])===null||_0x542cea===void 0x0?void 0x0:_0x542cea['body'])||{}),_0x5e2cbb=((0x0,core_2[_0x3e00b1(0xdf)])(interface_1[_0x3e00b1(0xf4)],_0x3b2b6d['target'])||[])[_0x3e00b1(0xee)](_0x2eccc8=>_0x2eccc8[_0x3e00b1(0x10a)]==_0x3b2b6d[_0x3e00b1(0x118)]);!(_0x35ac06===null||_0x35ac06===void 0x0?void 0x0:_0x35ac06['locale'])&&_0x4acd5b&&_0x4acd5b[_0x3e00b1(0x11b)]&&(_0x35ac06[_0x3e00b1(0xe6)]=_0x4acd5b[_0x3e00b1(0x11b)](i18n_1['I18N_ATTR_KEY']));for(let _0x3fbaf7=0x0;_0x3fbaf7<_0x5c0ca1[_0x3e00b1(0xe1)];_0x3fbaf7++){const _0x1281ac=_0x5c0ca1[_0x3fbaf7],_0x1ad779=this[_0x3e00b1(0xfe)][_0x3e00b1(0xe7)](_0x1281ac);if(_0x1ad779){if(typeof _0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7]=='undefined'||((_0x156242=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x156242===void 0x0?void 0x0:_0x156242[_0x3e00b1(0x100)])&&((_0x2da818=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x2da818===void 0x0?void 0x0:_0x2da818[_0x3e00b1(0xfc)])&&((_0xf9d6e5=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0xf9d6e5===void 0x0?void 0x0:_0xf9d6e5[_0x3e00b1(0x11a)]))_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7]=_0x156f7f;else((_0x2fdaa3=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x2fdaa3===void 0x0?void 0x0:_0x2fdaa3['name'])==_0x3e00b1(0x103)&&_0x3b2b6d[_0x3e00b1(0xdd)]['splice'](_0x3fbaf7,0x0,_0x156f7f);const _0x255da3=this['ValidatorService'][_0x3e00b1(0xe8)](_0x1ad779,_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7],_0x35ac06);_0x255da3&&(_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7]=_0x255da3);}else{if((_0x5e2cbb===null||_0x5e2cbb===void 0x0?void 0x0:_0x5e2cbb['methodArgs'][_0x3fbaf7])&&((_0x1c0e9f=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x1c0e9f===void 0x0?void 0x0:_0x1c0e9f[_0x3e00b1(0xed)])&&typeof _0x3b2b6d['args'][_0x3fbaf7][_0x3e00b1(0xe4)]=='function'&&((_0x2fdccd=_0x4acd5b===null||_0x4acd5b===void 0x0?void 0x0:_0x4acd5b[_0x3e00b1(0xed)])===null||_0x2fdccd===void 0x0?void 0x0:_0x2fdccd[_0x5e2cbb[_0x3e00b1(0xea)][_0x3fbaf7]]))_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7]=_0x1281ac((_0x35d4bb=_0x4acd5b===null||_0x4acd5b===void 0x0?void 0x0:_0x4acd5b[_0x3e00b1(0xed)])===null||_0x35d4bb===void 0x0?void 0x0:_0x35d4bb[_0x5e2cbb[_0x3e00b1(0xea)][_0x3fbaf7]]);else(_0x5e2cbb===null||_0x5e2cbb===void 0x0?void 0x0:_0x5e2cbb[_0x3e00b1(0xea)][_0x3fbaf7])&&((_0x4b3f=(_0x397dc0=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x397dc0===void 0x0?void 0x0:_0x397dc0[_0x3e00b1(0xed)])===null||_0x4b3f===void 0x0?void 0x0:_0x4b3f[_0x5e2cbb[_0x3e00b1(0xea)][_0x3fbaf7]])&&(_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7]=(_0x135c94=(_0x430054=_0x3b2b6d[_0x3e00b1(0xdd)][_0x3fbaf7])===null||_0x430054===void 0x0?void 0x0:_0x430054[_0x3e00b1(0xed)])===null||_0x135c94===void 0x0?void 0x0:_0x135c94[_0x5e2cbb[_0x3e00b1(0xea)][_0x3fbaf7]]);}}},'afterThrow':(_0x27edb7,_0x23c48f)=>{throw _0x23c48f;}};});}};__decorate([(0x0,core_2[a1_0x3f6658(0x112)])(),__metadata(a1_0x3f6658(0xff),core_1[a1_0x3f6658(0xe3)])],CustomConfiguration[a1_0x3f6658(0x107)],a1_0x3f6658(0xfa),void 0x0),__decorate([(0x0,core_2[a1_0x3f6658(0x112)])(),__metadata(a1_0x3f6658(0xff),ValidatorService_1[a1_0x3f6658(0xfe)])],CustomConfiguration[a1_0x3f6658(0x107)],a1_0x3f6658(0xfe),void 0x0),exports['CustomConfiguration']=CustomConfiguration=__decorate([(0x0,core_2[a1_0x3f6658(0x116)])({'conflictCheck':![],'imports':[i18n,anncic],'namespace':a1_0x3f6658(0x101),'importConfigs':[{'default':ConfigDefault}]})],CustomConfiguration);
|
package/dist/decorator/Rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a2_0x50db(){const _0x4e7a05=['getPropertyType','keys','saveClassMetadata','1658146RLeOgo','6599180KXyqqj','meta','Rule','@midwayjs/core','attachClassMetadata','default','defineProperty','function','(((.+)+)+)+$','Array','1095173ubAHuD','constructor','map','apply','name','label','4068370TEocTq','@joi/date','joi','211347gTtxIJ','array','object','296YBawfP','extend','__esModule','2594169byYzhi','6OFPENw','isSchema','search','RULES_KEY','toString','RuleType','88aObgPh','56290dyPQEi','getClassMetadata'];a2_0x50db=function(){return _0x4e7a05;};return a2_0x50db();}const a2_0x577dd8=a2_0x2db6;(function(_0x5b41cd,_0x18a11f){const _0x34b19e=a2_0x2db6,_0x2aff7e=_0x5b41cd();while(!![]){try{const _0x109fa0=-parseInt(_0x34b19e(0xed))/0x1+-parseInt(_0x34b19e(0xe2))/0x2+parseInt(_0x34b19e(0xfc))/0x3+parseInt(_0x34b19e(0xdc))/0x4*(parseInt(_0x34b19e(0xdd))/0x5)+parseInt(_0x34b19e(0xd6))/0x6*(parseInt(_0x34b19e(0xe3))/0x7)+-parseInt(_0x34b19e(0xf9))/0x8*(-parseInt(_0x34b19e(0xf6))/0x9)+-parseInt(_0x34b19e(0xf3))/0xa;if(_0x109fa0===_0x18a11f)break;else _0x2aff7e['push'](_0x2aff7e['shift']());}catch(_0x3f1936){_0x2aff7e['push'](_0x2aff7e['shift']());}}}(a2_0x50db,0x90c1f));const a2_0x26ab93=(function(){let _0x59b6c9=!![];return function(_0x3ea159,_0xc9ed74){const _0x2fbfe5=_0x59b6c9?function(){const _0x122ef7=a2_0x2db6;if(_0xc9ed74){const _0x12d895=_0xc9ed74[_0x122ef7(0xf0)](_0x3ea159,arguments);return _0xc9ed74=null,_0x12d895;}}:function(){};return _0x59b6c9=![],_0x2fbfe5;};}()),a2_0x32f5c2=a2_0x26ab93(this,function(){const _0x2c62d2=a2_0x2db6;return a2_0x32f5c2[_0x2c62d2(0xda)]()['search'](_0x2c62d2(0xeb))[_0x2c62d2(0xda)]()[_0x2c62d2(0xee)](a2_0x32f5c2)[_0x2c62d2(0xd8)]('(((.+)+)+)+$');});a2_0x32f5c2();function a2_0x2db6(_0x5bad95,_0x3327ba){const _0x4fc598=a2_0x50db();return a2_0x2db6=function(_0x32f5c2,_0x26ab93){_0x32f5c2=_0x32f5c2-0xd6;let _0x50db3d=_0x4fc598[_0x32f5c2];return _0x50db3d;},a2_0x2db6(_0x5bad95,_0x3327ba);}'use strict';Object[a2_0x577dd8(0xe9)](exports,a2_0x577dd8(0xfb),{'value':!![]}),exports[a2_0x577dd8(0xe5)]=exports[a2_0x577dd8(0xdb)]=void 0x0;const joi=require(a2_0x577dd8(0xf5)),date_1=require(a2_0x577dd8(0xf4)),core_1=require(a2_0x577dd8(0xe6)),interface_1=require('../interface');exports[a2_0x577dd8(0xdb)]=joi[a2_0x577dd8(0xfa)](date_1[a2_0x577dd8(0xe8)]);function Rule(_0x5c9517,_0x4ec6b0,_0x4d24a8=''){return(_0x1888a3,_0x366e4a)=>{const _0x549291=a2_0x2db6;var _0x1feb3a;if(_0x366e4a)!joi['isSchema'](_0x4ec6b0)&&(_0x4ec6b0===null||_0x4ec6b0===void 0x0?void 0x0:_0x4ec6b0[_0x549291(0xf1)])&&(_0x4ec6b0=joi[_0x549291(0xf8)]((0x0,core_1[_0x549291(0xde)])(interface_1['RULES_KEY'],_0x4ec6b0))[_0x549291(0xe4)]({'id':_0x4ec6b0[_0x549291(0xf1)]}),(0x0,core_1[_0x549291(0xdf)])(_0x1888a3,_0x366e4a)[_0x549291(0xf1)]===_0x549291(0xec)&&(_0x4ec6b0=joi[_0x549291(0xf7)]()['items'](_0x4ec6b0))),joi[_0x549291(0xd7)](_0x4ec6b0)&&(_0x5c9517&&typeof(_0x4ec6b0===null||_0x4ec6b0===void 0x0?void 0x0:_0x4ec6b0[_0x549291(0xf2)])==_0x549291(0xea)&&(_0x4ec6b0=_0x4ec6b0['label'](_0x5c9517)),_0x4d24a8&&typeof(_0x4ec6b0===null||_0x4ec6b0===void 0x0?void 0x0:_0x4ec6b0['description'])==_0x549291(0xea)&&(_0x4ec6b0=_0x4ec6b0['description'](_0x4d24a8)),(0x0,core_1[_0x549291(0xe7)])(interface_1[_0x549291(0xd9)],_0x4ec6b0,_0x1888a3,_0x366e4a));else{const _0x94f728=(0x0,core_1[_0x549291(0xde)])(interface_1[_0x549291(0xd9)],_0x4ec6b0);if(_0x94f728){let _0x4b9c62=(_0x1feb3a=(0x0,core_1['getClassMetadata'])(interface_1[_0x549291(0xd9)],_0x1888a3))!==null&&_0x1feb3a!==void 0x0?_0x1feb3a:{};Object[_0x549291(0xe0)](_0x94f728)[_0x549291(0xef)](_0x46c6dc=>{!_0x4b9c62[_0x46c6dc]&&(_0x4b9c62[_0x46c6dc]=_0x94f728[_0x46c6dc]);}),(0x0,core_1[_0x549291(0xe1)])(interface_1[_0x549291(0xd9)],_0x4b9c62,_0x1888a3);}}};}exports[a2_0x577dd8(0xe5)]=Rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a3_0x141092=a3_0x4e59;(function(_0x568698,_0x4ee10b){const _0x3857c9=a3_0x4e59,_0x3d32c4=_0x568698();while(!![]){try{const _0x22f243=parseInt(_0x3857c9(0x157))/0x1+-parseInt(_0x3857c9(0x14a))/0x2+-parseInt(_0x3857c9(0x144))/0x3*(parseInt(_0x3857c9(0x156))/0x4)+parseInt(_0x3857c9(0x146))/0x5+-parseInt(_0x3857c9(0x154))/0x6+-parseInt(_0x3857c9(0x14d))/0x7*(parseInt(_0x3857c9(0x14f))/0x8)+-parseInt(_0x3857c9(0x149))/0x9*(-parseInt(_0x3857c9(0x143))/0xa);if(_0x22f243===_0x4ee10b)break;else _0x3d32c4['push'](_0x3d32c4['shift']());}catch(_0x107df2){_0x3d32c4['push'](_0x3d32c4['shift']());}}}(a3_0x2fb1,0x542ef));const a3_0x223ea8=(function(){let _0x3e5ac4=!![];return function(_0x224079,_0x206a62){const _0x110544=_0x3e5ac4?function(){if(_0x206a62){const _0x3054d6=_0x206a62['apply'](_0x224079,arguments);return _0x206a62=null,_0x3054d6;}}:function(){};return _0x3e5ac4=![],_0x110544;};}()),a3_0xddda03=a3_0x223ea8(this,function(){const _0x9ce4da=a3_0x4e59;return a3_0xddda03[_0x9ce4da(0x148)]()[_0x9ce4da(0x14c)]('(((.+)+)+)+$')[_0x9ce4da(0x148)]()[_0x9ce4da(0x147)](a3_0xddda03)[_0x9ce4da(0x14c)](_0x9ce4da(0x152));});a3_0xddda03();'use strict';Object[a3_0x141092(0x142)](exports,'__esModule',{'value':!![]}),exports['getFuncArgs']=exports[a3_0x141092(0x158)]=void 0x0;const core_1=require(a3_0x141092(0x159)),interface_1=require(a3_0x141092(0x141));function a3_0x2fb1(){const _0x3f3f99=['14385BNgXxY','indexOf','432pDcOae','attachClassMetadata','prototype','(((.+)+)+)+$','function','3214842bPncQd','createCustomMethodDecorator','723448atFLOy','314261yBECPH','Validator','@midwayjs/core','replace','../interface','defineProperty','10kSTByI','9dytJhW','slice','3348215McJgPd','constructor','toString','8281503XmQJzg','739786RGxRIV','VALIDATOR_KEY','search'];a3_0x2fb1=function(){return _0x3f3f99;};return a3_0x2fb1();}function Validator(_0x5eec00={}){return(_0x5ae274,_0x3df020,_0x301eee)=>{const _0x534986=a3_0x4e59,_0x4d1a20=getFuncArgs(_0x5ae274[_0x3df020]);(0x0,core_1[_0x534986(0x150)])(interface_1[_0x534986(0x14b)],{'method':_0x3df020,'methodArgs':_0x4d1a20},_0x5ae274),(0x0,core_1[_0x534986(0x155)])(interface_1[_0x534986(0x14b)],_0x5eec00)(_0x5ae274,_0x3df020,_0x301eee);};}function a3_0x4e59(_0x1d7b18,_0x45eeca){const _0x435180=a3_0x2fb1();return a3_0x4e59=function(_0xddda03,_0x223ea8){_0xddda03=_0xddda03-0x140;let _0x2fb105=_0x435180[_0xddda03];return _0x2fb105;},a3_0x4e59(_0x1d7b18,_0x45eeca);}exports[a3_0x141092(0x158)]=Validator;function getFuncArgs(_0x3f966a){const _0x305fc7=a3_0x141092;if(typeof _0x3f966a==_0x305fc7(0x153)){const _0x377e55=/=>.*$/mg,_0x33f5b4=/=[^,)]+/mg,_0xff7844=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,_0x3af273=(_0x3f966a[_0x305fc7(0x151)]?_0x3f966a[_0x305fc7(0x151)][_0x305fc7(0x147)]['toString']():_0x3f966a[_0x305fc7(0x148)]())[_0x305fc7(0x140)](_0xff7844,'')[_0x305fc7(0x140)](_0x377e55,'')[_0x305fc7(0x140)](_0x33f5b4,''),_0x1a7d20=_0x3af273[_0x305fc7(0x145)](_0x3af273[_0x305fc7(0x14e)]('(')+0x1,_0x3af273[_0x305fc7(0x14e)](')'))['match'](/([^\s,]+)/g)||[];return _0x1a7d20;}}exports['getFuncArgs']=getFuncArgs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a4_0x4e99(){var _0x215244=['__esModule','参数验证失败','metadata','ValidatorError','AnnErrorMsg','4lbqQxn','apply','58506gwHtie','length','object','toString','1365687WWmmow','(((.+)+)+)+$','function','11387043qtyaVq','8lUthRu','PARAMS','20KBlgHD','NOFIND_SCHEMA','212165hYgbtE','decorate','100673lfIkSy','13790CCJUUY','8305008cxYANZ','4422VkJpAV','203CsjYgt','__decorate','defineProperty','__metadata'];a4_0x4e99=function(){return _0x215244;};return a4_0x4e99();}var a4_0x891b95=a4_0x27a0;(function(_0x56b1d8,_0x35785b){var _0x20cc5d=a4_0x27a0,_0x18116f=_0x56b1d8();while(!![]){try{var _0x346409=-parseInt(_0x20cc5d(0xa0))/0x1*(-parseInt(_0x20cc5d(0x9c))/0x2)+-parseInt(_0x20cc5d(0x96))/0x3+-parseInt(_0x20cc5d(0xad))/0x4*(parseInt(_0x20cc5d(0x9e))/0x5)+-parseInt(_0x20cc5d(0x92))/0x6*(-parseInt(_0x20cc5d(0xa4))/0x7)+parseInt(_0x20cc5d(0x9a))/0x8*(parseInt(_0x20cc5d(0x99))/0x9)+parseInt(_0x20cc5d(0xa1))/0xa*(-parseInt(_0x20cc5d(0xa3))/0xb)+-parseInt(_0x20cc5d(0xa2))/0xc;if(_0x346409===_0x35785b)break;else _0x18116f['push'](_0x18116f['shift']());}catch(_0x395fcc){_0x18116f['push'](_0x18116f['shift']());}}}(a4_0x4e99,0xc5e88));var a4_0x184cf9=(function(){var _0x5b000e=!![];return function(_0xebdf11,_0x3365b1){var _0x121aed=_0x5b000e?function(){var _0x3c7c66=a4_0x27a0;if(_0x3365b1){var _0x277436=_0x3365b1[_0x3c7c66(0x91)](_0xebdf11,arguments);return _0x3365b1=null,_0x277436;}}:function(){};return _0x5b000e=![],_0x121aed;};}()),a4_0x3087e5=a4_0x184cf9(this,function(){var _0x1c25d3=a4_0x27a0;return a4_0x3087e5[_0x1c25d3(0x95)]()['search']('(((.+)+)+)+$')[_0x1c25d3(0x95)]()['constructor'](a4_0x3087e5)['search'](_0x1c25d3(0x97));});a4_0x3087e5();'use strict';var __decorate=this&&this[a4_0x891b95(0xa5)]||function(_0xbdea66,_0x453283,_0x209833,_0x2e5f7b){var _0xa6931c=a4_0x891b95,_0x10ad9b=arguments['length'],_0x4e8172=_0x10ad9b<0x3?_0x453283:_0x2e5f7b===null?_0x2e5f7b=Object['getOwnPropertyDescriptor'](_0x453283,_0x209833):_0x2e5f7b,_0x319275;if(typeof Reflect===_0xa6931c(0x94)&&typeof Reflect[_0xa6931c(0x9f)]==='function')_0x4e8172=Reflect['decorate'](_0xbdea66,_0x453283,_0x209833,_0x2e5f7b);else{for(var _0x261f36=_0xbdea66[_0xa6931c(0x93)]-0x1;_0x261f36>=0x0;_0x261f36--)if(_0x319275=_0xbdea66[_0x261f36])_0x4e8172=(_0x10ad9b<0x3?_0x319275(_0x4e8172):_0x10ad9b>0x3?_0x319275(_0x453283,_0x209833,_0x4e8172):_0x319275(_0x453283,_0x209833))||_0x4e8172;}return _0x10ad9b>0x3&&_0x4e8172&&Object[_0xa6931c(0xa6)](_0x453283,_0x209833,_0x4e8172),_0x4e8172;},__metadata=this&&this[a4_0x891b95(0xa7)]||function(_0x31105a,_0x5ab1d5){var _0xb42f8a=a4_0x891b95;if(typeof Reflect===_0xb42f8a(0x94)&&typeof Reflect[_0xb42f8a(0xaa)]===_0xb42f8a(0x98))return Reflect['metadata'](_0x31105a,_0x5ab1d5);};Object[a4_0x891b95(0xa6)](exports,a4_0x891b95(0xa8),{'value':!![]}),exports[a4_0x891b95(0xab)]=void 0x0;const core_1=require('@anncic-api/core');function a4_0x27a0(_0x1849e6,_0x3ed45e){var _0xdde10d=a4_0x4e99();return a4_0x27a0=function(_0x3087e5,_0x184cf9){_0x3087e5=_0x3087e5-0x91;var _0x4e99e2=_0xdde10d[_0x3087e5];return _0x4e99e2;},a4_0x27a0(_0x1849e6,_0x3ed45e);}class ValidatorError extends AnnError{}exports[a4_0x891b95(0xab)]=ValidatorError,ValidatorError['PARAMS']=0x18c1e,ValidatorError[a4_0x891b95(0x9d)]=0x18c1c,__decorate([(0x0,core_1[a4_0x891b95(0xac)])(a4_0x891b95(0xa9)),__metadata('design:type',Object)],ValidatorError,a4_0x891b95(0x9b),void 0x0),__decorate([(0x0,core_1[a4_0x891b95(0xac)])(a4_0x891b95(0xa9)),__metadata('design:type',Object)],ValidatorError,a4_0x891b95(0x9d),void 0x0);
|
package/dist/helper/dtoHelper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a5_0x2cf7(_0x3c6c98,_0x2ecc6c){const _0x3bb5b4=a5_0x4672();return a5_0x2cf7=function(_0x320298,_0x2071ce){_0x320298=_0x320298-0x166;let _0x467237=_0x3bb5b4[_0x320298];return _0x467237;},a5_0x2cf7(_0x3c6c98,_0x2ecc6c);}const a5_0x2d69a3=a5_0x2cf7;(function(_0x57bdee,_0x253712){const _0x1d0487=a5_0x2cf7,_0x311db3=_0x57bdee();while(!![]){try{const _0x4736a4=-parseInt(_0x1d0487(0x16a))/0x1+-parseInt(_0x1d0487(0x16f))/0x2+-parseInt(_0x1d0487(0x171))/0x3*(-parseInt(_0x1d0487(0x179))/0x4)+parseInt(_0x1d0487(0x174))/0x5+parseInt(_0x1d0487(0x177))/0x6+-parseInt(_0x1d0487(0x178))/0x7+parseInt(_0x1d0487(0x169))/0x8*(parseInt(_0x1d0487(0x168))/0x9);if(_0x4736a4===_0x253712)break;else _0x311db3['push'](_0x311db3['shift']());}catch(_0x47a360){_0x311db3['push'](_0x311db3['shift']());}}}(a5_0x4672,0x88c08));const a5_0x2071ce=(function(){let _0x12ca40=!![];return function(_0x2b3282,_0x279a47){const _0x25f7fd=_0x12ca40?function(){const _0x3d3aed=a5_0x2cf7;if(_0x279a47){const _0xd0100b=_0x279a47[_0x3d3aed(0x16e)](_0x2b3282,arguments);return _0x279a47=null,_0xd0100b;}}:function(){};return _0x12ca40=![],_0x25f7fd;};}()),a5_0x320298=a5_0x2071ce(this,function(){const _0x1d986f=a5_0x2cf7;return a5_0x320298[_0x1d986f(0x170)]()[_0x1d986f(0x175)](_0x1d986f(0x17a))['toString']()[_0x1d986f(0x176)](a5_0x320298)[_0x1d986f(0x175)](_0x1d986f(0x17a));});a5_0x320298();'use strict';Object[a5_0x2d69a3(0x16c)](exports,'__esModule',{'value':!![]}),exports[a5_0x2d69a3(0x166)]=exports[a5_0x2d69a3(0x173)]=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require('../interface');function PickDto(_0x57131e,_0x1fd1f3){const _0x3e624c=a5_0x2d69a3,_0x364d7a=function(){};_0x364d7a['prototype']=_0x57131e[_0x3e624c(0x16d)];const _0x12fb3a=(0x0,core_1[_0x3e624c(0x167)])(interface_1[_0x3e624c(0x172)],_0x57131e),_0x53953d={};for(const _0x3c3acd of _0x1fd1f3){_0x12fb3a[_0x3c3acd]&&(_0x53953d[_0x3c3acd]=_0x12fb3a[_0x3c3acd]);}return(0x0,core_1[_0x3e624c(0x16b)])(interface_1[_0x3e624c(0x172)],_0x53953d,_0x364d7a),_0x364d7a;}exports['PickDto']=PickDto;function OmitDto(_0x48954c,_0xd71366){const _0x3b842e=a5_0x2d69a3,_0x395c4f=function(){};_0x395c4f[_0x3b842e(0x16d)]=_0x48954c[_0x3b842e(0x16d)];const _0x190452=(0x0,core_1['getClassExtendedMetadata'])(interface_1[_0x3b842e(0x172)],_0x48954c),_0x202522=Object['assign']({},_0x190452);for(const _0x4d228b of _0xd71366){delete _0x202522[_0x4d228b];}return(0x0,core_1[_0x3b842e(0x16b)])(interface_1[_0x3b842e(0x172)],_0x202522,_0x395c4f),_0x395c4f;}function a5_0x4672(){const _0x6d8a03=['4532340iivWmU','7385910MNDktK','3656304bGITrS','(((.+)+)+)+$','OmitDto','getClassExtendedMetadata','8645283GzzVlm','8RSJSZd','1060609pHVPFR','saveClassMetadata','defineProperty','prototype','apply','1673058jnSiHg','toString','3rLNbez','RULES_KEY','PickDto','4411755GRbkVa','search','constructor'];a5_0x4672=function(){return _0x6d8a03;};return a5_0x4672();}exports['OmitDto']=OmitDto;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var a6_0x290a59=a6_0x14e7;(function(_0x5b7c3d,_0x525a3a){var _0x4084e9=a6_0x14e7,_0x159b51=_0x5b7c3d();while(!![]){try{var _0x209a0d=-parseInt(_0x4084e9(0xbf))/0x1+-parseInt(_0x4084e9(0xb0))/0x2*(-parseInt(_0x4084e9(0xc4))/0x3)+-parseInt(_0x4084e9(0xca))/0x4*(parseInt(_0x4084e9(0xc8))/0x5)+parseInt(_0x4084e9(0xb9))/0x6*(parseInt(_0x4084e9(0xcb))/0x7)+-parseInt(_0x4084e9(0xce))/0x8+parseInt(_0x4084e9(0xb8))/0x9*(-parseInt(_0x4084e9(0xb1))/0xa)+parseInt(_0x4084e9(0xb3))/0xb*(parseInt(_0x4084e9(0xb4))/0xc);if(_0x209a0d===_0x525a3a)break;else _0x159b51['push'](_0x159b51['shift']());}catch(_0x1e2b53){_0x159b51['push'](_0x159b51['shift']());}}}(a6_0x2b60,0xc0172));var a6_0x4ff7ff=(function(){var _0x3fb13e=!![];return function(_0x5e6301,_0x52b932){var _0x365d14=_0x3fb13e?function(){var _0x41f9c3=a6_0x14e7;if(_0x52b932){var _0x5c6db4=_0x52b932[_0x41f9c3(0xc7)](_0x5e6301,arguments);return _0x52b932=null,_0x5c6db4;}}:function(){};return _0x3fb13e=![],_0x365d14;};}()),a6_0x53bd8d=a6_0x4ff7ff(this,function(){var _0x4e0266=a6_0x14e7;return a6_0x53bd8d[_0x4e0266(0xc0)]()[_0x4e0266(0xbb)](_0x4e0266(0xcf))['toString']()[_0x4e0266(0xbc)](a6_0x53bd8d)['search'](_0x4e0266(0xcf));});a6_0x53bd8d();function a6_0x14e7(_0x4c1a88,_0x2c0957){var _0xae476b=a6_0x2b60();return a6_0x14e7=function(_0x53bd8d,_0x4ff7ff){_0x53bd8d=_0x53bd8d-0xaf;var _0x2b600c=_0xae476b[_0x53bd8d];return _0x2b600c;},a6_0x14e7(_0x4c1a88,_0x2c0957);}'use strict';var __createBinding=this&&this['__createBinding']||(Object[a6_0x290a59(0xd2)]?function(_0x15c407,_0x201272,_0x42e0f6,_0x3b8a67){var _0x5befef=a6_0x290a59;if(_0x3b8a67===undefined)_0x3b8a67=_0x42e0f6;var _0x5a9f88=Object[_0x5befef(0xb7)](_0x201272,_0x42e0f6);(!_0x5a9f88||(_0x5befef(0xb5)in _0x5a9f88?!_0x201272[_0x5befef(0xba)]:_0x5a9f88[_0x5befef(0xc2)]||_0x5a9f88[_0x5befef(0xd6)]))&&(_0x5a9f88={'enumerable':!![],'get':function(){return _0x201272[_0x42e0f6];}}),Object[_0x5befef(0xd0)](_0x15c407,_0x3b8a67,_0x5a9f88);}:function(_0x34a81b,_0x35fa52,_0x410a6a,_0xdf6f79){if(_0xdf6f79===undefined)_0xdf6f79=_0x410a6a;_0x34a81b[_0xdf6f79]=_0x35fa52[_0x410a6a];}),__exportStar=this&&this[a6_0x290a59(0xcc)]||function(_0x40cceb,_0x4d17ba){var _0x5ee5d1=a6_0x290a59;for(var _0x31a0d9 in _0x40cceb)if(_0x31a0d9!==_0x5ee5d1(0xc3)&&!Object['prototype']['hasOwnProperty'][_0x5ee5d1(0xb2)](_0x4d17ba,_0x31a0d9))__createBinding(_0x4d17ba,_0x40cceb,_0x31a0d9);};Object[a6_0x290a59(0xd0)](exports,a6_0x290a59(0xba),{'value':!![]}),exports[a6_0x290a59(0xd5)]=exports[a6_0x290a59(0xaf)]=exports['ValidatorError']=exports[a6_0x290a59(0xc6)]=exports['Rule']=exports[a6_0x290a59(0xd4)]=void 0x0,__exportStar(require(a6_0x290a59(0xc1)),exports),__exportStar(require(a6_0x290a59(0xbd)),exports);var Validator_1=require(a6_0x290a59(0xc5));Object['defineProperty'](exports,a6_0x290a59(0xd4),{'enumerable':!![],'get':function(){var _0xf2bb4c=a6_0x290a59;return Validator_1[_0xf2bb4c(0xd4)];}});var Rule_1=require('./decorator/Rule');Object['defineProperty'](exports,a6_0x290a59(0xb6),{'enumerable':!![],'get':function(){var _0x531cc9=a6_0x290a59;return Rule_1[_0x531cc9(0xb6)];}}),Object['defineProperty'](exports,a6_0x290a59(0xc6),{'enumerable':!![],'get':function(){return Rule_1['RuleType'];}});var ValidatorError_1=require(a6_0x290a59(0xd3));Object[a6_0x290a59(0xd0)](exports,a6_0x290a59(0xcd),{'enumerable':!![],'get':function(){var _0x255e44=a6_0x290a59;return ValidatorError_1[_0x255e44(0xcd)];}});var ValidatorService_1=require(a6_0x290a59(0xc9));Object[a6_0x290a59(0xd0)](exports,a6_0x290a59(0xaf),{'enumerable':!![],'get':function(){var _0x52b91b=a6_0x290a59;return ValidatorService_1[_0x52b91b(0xaf)];}});var configuration_1=require(a6_0x290a59(0xbe));function a6_0x2b60(){var _0x54daa3=['1947kxUXVu','./decorator/Validator','RuleType','apply','9635iHEczU','./service/ValidatorService','2780NvcQyP','7BZBQqj','__exportStar','ValidatorError','5655648ZefIOo','(((.+)+)+)+$','defineProperty','CustomConfiguration','create','./exception/ValidatorError','Validator','Configuration','configurable','ValidatorService','4684QFlemR','3180OoEdVo','call','9960995PQapZJ','12kTZXcx','get','Rule','getOwnPropertyDescriptor','513HoOElF','4408230AcoYlf','__esModule','search','constructor','./helper/dtoHelper','./configuration','309059nOFHOc','toString','./interface','writable','default'];a6_0x2b60=function(){return _0x54daa3;};return a6_0x2b60();}Object[a6_0x290a59(0xd0)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x3e77a9=a6_0x290a59;return configuration_1[_0x3e77a9(0xd1)];}});
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var a7_0x313813=a7_0x25f7;function a7_0x4a9c(){var _0x1a1742=['3403035UOjSAC','7542066rzjmwy','defineProperty','anncic-api:validator:validator','2kyAhVb','toString','RULES_KEY','1107552vGKKkM','(((.+)+)+)+$','10oSJBVh','4585284ZmmoaS','310776zOcrtG','155321cbjHeb','7UlLNWW','__esModule','search','2115720ikgKta'];a7_0x4a9c=function(){return _0x1a1742;};return a7_0x4a9c();}(function(_0x435000,_0x3acd1a){var _0xa25e77=a7_0x25f7,_0x596de7=_0x435000();while(!![]){try{var _0x61e8aa=-parseInt(_0xa25e77(0x184))/0x1*(-parseInt(_0xa25e77(0x18d))/0x2)+-parseInt(_0xa25e77(0x190))/0x3+-parseInt(_0xa25e77(0x182))/0x4+parseInt(_0xa25e77(0x188))/0x5+parseInt(_0xa25e77(0x18a))/0x6+parseInt(_0xa25e77(0x185))/0x7*(parseInt(_0xa25e77(0x183))/0x8)+-parseInt(_0xa25e77(0x189))/0x9*(-parseInt(_0xa25e77(0x181))/0xa);if(_0x61e8aa===_0x3acd1a)break;else _0x596de7['push'](_0x596de7['shift']());}catch(_0x32fe2b){_0x596de7['push'](_0x596de7['shift']());}}}(a7_0x4a9c,0xb3ea5));var a7_0x1de646=(function(){var _0x2b137e=!![];return function(_0x314d2e,_0xb5c479){var _0x4273a8=_0x2b137e?function(){if(_0xb5c479){var _0x2bc19e=_0xb5c479['apply'](_0x314d2e,arguments);return _0xb5c479=null,_0x2bc19e;}}:function(){};return _0x2b137e=![],_0x4273a8;};}()),a7_0x1c4c40=a7_0x1de646(this,function(){var _0x1f281c=a7_0x25f7;return a7_0x1c4c40[_0x1f281c(0x18e)]()['search'](_0x1f281c(0x191))[_0x1f281c(0x18e)]()['constructor'](a7_0x1c4c40)[_0x1f281c(0x187)](_0x1f281c(0x191));});a7_0x1c4c40();function a7_0x25f7(_0x363acc,_0x46fb32){var _0x1a271b=a7_0x4a9c();return a7_0x25f7=function(_0x1c4c40,_0x1de646){_0x1c4c40=_0x1c4c40-0x181;var _0x4a9c34=_0x1a271b[_0x1c4c40];return _0x4a9c34;},a7_0x25f7(_0x363acc,_0x46fb32);}'use strict';Object[a7_0x313813(0x18b)](exports,a7_0x313813(0x186),{'value':!![]}),exports['VALIDATOR_KEY']=exports[a7_0x313813(0x18f)]=void 0x0,exports[a7_0x313813(0x18f)]='anncic-api:validator:rules',exports['VALIDATOR_KEY']=a7_0x313813(0x18c);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a8_0x5f527f=a8_0x2542;(function(_0x36675f,_0x4df0c3){const _0x4bffd1=a8_0x2542,_0x167ba0=_0x36675f();while(!![]){try{const _0x5e4fbe=-parseInt(_0x4bffd1(0xec))/0x1*(parseInt(_0x4bffd1(0xe5))/0x2)+-parseInt(_0x4bffd1(0xd3))/0x3*(parseInt(_0x4bffd1(0xc1))/0x4)+parseInt(_0x4bffd1(0xee))/0x5+parseInt(_0x4bffd1(0xe6))/0x6+-parseInt(_0x4bffd1(0xed))/0x7+-parseInt(_0x4bffd1(0xc0))/0x8*(-parseInt(_0x4bffd1(0xb4))/0x9)+parseInt(_0x4bffd1(0xbf))/0xa;if(_0x5e4fbe===_0x4df0c3)break;else _0x167ba0['push'](_0x167ba0['shift']());}catch(_0x268a0b){_0x167ba0['push'](_0x167ba0['shift']());}}}(a8_0x29c3,0x8ad52));const a8_0x38eb96=(function(){let _0x5c3231=!![];return function(_0x5afd0a,_0x41c309){const _0x550fbd=_0x5c3231?function(){const _0x36286f=a8_0x2542;if(_0x41c309){const _0x5aded0=_0x41c309[_0x36286f(0xae)](_0x5afd0a,arguments);return _0x41c309=null,_0x5aded0;}}:function(){};return _0x5c3231=![],_0x550fbd;};}()),a8_0x164f42=a8_0x38eb96(this,function(){const _0x31e710=a8_0x2542;return a8_0x164f42[_0x31e710(0xc5)]()[_0x31e710(0xbe)](_0x31e710(0xbd))[_0x31e710(0xc5)]()[_0x31e710(0xd0)](a8_0x164f42)[_0x31e710(0xbe)](_0x31e710(0xbd));});function a8_0x2542(_0x5d6643,_0x41c944){const _0x4af6a1=a8_0x29c3();return a8_0x2542=function(_0x164f42,_0x38eb96){_0x164f42=_0x164f42-0xa5;let _0x29c3d7=_0x4af6a1[_0x164f42];return _0x29c3d7;},a8_0x2542(_0x5d6643,_0x41c944);}a8_0x164f42();'use strict';var __decorate=this&&this[a8_0x5f527f(0xa5)]||function(_0x30589a,_0x81ccfd,_0x39043c,_0xe6e404){const _0x376ae6=a8_0x5f527f;var _0x2af432=arguments[_0x376ae6(0xb2)],_0x4b4576=_0x2af432<0x3?_0x81ccfd:_0xe6e404===null?_0xe6e404=Object[_0x376ae6(0xc3)](_0x81ccfd,_0x39043c):_0xe6e404,_0x322e86;if(typeof Reflect===_0x376ae6(0xc2)&&typeof Reflect[_0x376ae6(0xde)]===_0x376ae6(0xcc))_0x4b4576=Reflect[_0x376ae6(0xde)](_0x30589a,_0x81ccfd,_0x39043c,_0xe6e404);else{for(var _0x3d9d1c=_0x30589a[_0x376ae6(0xb2)]-0x1;_0x3d9d1c>=0x0;_0x3d9d1c--)if(_0x322e86=_0x30589a[_0x3d9d1c])_0x4b4576=(_0x2af432<0x3?_0x322e86(_0x4b4576):_0x2af432>0x3?_0x322e86(_0x81ccfd,_0x39043c,_0x4b4576):_0x322e86(_0x81ccfd,_0x39043c))||_0x4b4576;}return _0x2af432>0x3&&_0x4b4576&&Object[_0x376ae6(0xf1)](_0x81ccfd,_0x39043c,_0x4b4576),_0x4b4576;},__metadata=this&&this['__metadata']||function(_0x593b5f,_0x5edde4){const _0xbec953=a8_0x5f527f;if(typeof Reflect===_0xbec953(0xc2)&&typeof Reflect[_0xbec953(0xc7)]===_0xbec953(0xcc))return Reflect[_0xbec953(0xc7)](_0x593b5f,_0x5edde4);};Object[a8_0x5f527f(0xf1)](exports,a8_0x5f527f(0xdd),{'value':!![]}),exports[a8_0x5f527f(0xb1)]=void 0x0;const Joi=require(a8_0x5f527f(0xe1)),i18n_1=require('@midwayjs/i18n'),core_1=require(a8_0x5f527f(0xe3)),interface_1=require('../interface'),ValidatorError_1=require('../exception/ValidatorError');let ValidatorService=exports['ValidatorService']=class ValidatorService{constructor(){this['messages']={};}async[a8_0x5f527f(0xdc)](){const _0x3dbda1=a8_0x5f527f,_0x174a15=Object[_0x3dbda1(0xcf)](this[_0x3dbda1(0xac)][_0x3dbda1(0xb6)]);_0x174a15[_0x3dbda1(0xc4)](_0x5b7f39=>{const _0x89ae8f=_0x3dbda1;this['messages'][(0x0,i18n_1[_0x89ae8f(0xd1)])(_0x5b7f39)]=Object[_0x89ae8f(0xda)](this[_0x89ae8f(0xb0)][_0x89ae8f(0xba)](_0x5b7f39,_0x89ae8f(0xeb)));});}[a8_0x5f527f(0xca)](_0x2e554f){const _0x497826=a8_0x5f527f,_0x42ae2f=(0x0,core_1[_0x497826(0xd2)])(interface_1[_0x497826(0xcd)],_0x2e554f);return _0x42ae2f?Joi['object'](_0x42ae2f):undefined;}[a8_0x5f527f(0xeb)](_0x3bc427,_0xe3a3d,_0x873d27={}){const _0x3e3ea2=a8_0x5f527f;var _0x5e24c2,_0xe3af7d,_0x5bec4c,_0x199013,_0xd3305c,_0x29ec06;const _0x43d0db=Joi[_0x3e3ea2(0xe9)](_0x3bc427)?_0x3bc427:this[_0x3e3ea2(0xca)](_0x3bc427);if(!_0x43d0db)throw new AnnError(ValidatorError_1[_0x3e3ea2(0xd6)][_0x3e3ea2(0xe0)]);_0x873d27[_0x3e3ea2(0xb9)]=Object[_0x3e3ea2(0xc8)]((_0x5e24c2=this[_0x3e3ea2(0xf0)][_0x3e3ea2(0xb9)])!==null&&_0x5e24c2!==void 0x0?_0x5e24c2:{},{'messages':this['messages']},_0x873d27[_0x3e3ea2(0xb9)]||{}),_0x873d27[_0x3e3ea2(0xb9)]['errors']=_0x873d27['validationOptions'][_0x3e3ea2(0xea)]||{},_0x873d27[_0x3e3ea2(0xb9)][_0x3e3ea2(0xea)]['language']=(0x0,i18n_1[_0x3e3ea2(0xd1)])(this[_0x3e3ea2(0xb0)][_0x3e3ea2(0xaf)](_0x873d27[_0x3e3ea2(0xb9)][_0x3e3ea2(0xea)][_0x3e3ea2(0xa9)]||_0x873d27[_0x3e3ea2(0xa8)]||this['i18nConfig'][_0x3e3ea2(0xd7)],'validator'));const _0x4e676d=_0x43d0db[_0x3e3ea2(0xe2)](_0xe3a3d,_0x873d27['validationOptions']);if(_0x4e676d===null||_0x4e676d===void 0x0?void 0x0:_0x4e676d['error']){if(_0x4e676d[_0x3e3ea2(0xbb)]instanceof AnnError)throw _0x4e676d[_0x3e3ea2(0xbb)];else{if(_0x4e676d[_0x3e3ea2(0xbb)]instanceof Error)throw new AnnError(ValidatorError_1[_0x3e3ea2(0xd6)]['PARAMS'],{'message':((_0xe3af7d=_0x4e676d[_0x3e3ea2(0xbb)])===null||_0xe3af7d===void 0x0?void 0x0:_0xe3af7d[_0x3e3ea2(0xb7)])||_0x3e3ea2(0xbc)});else throw new AnnError(ValidatorError_1['ValidatorError']['PARAMS'],{'message':((_0xd3305c=(_0x199013=(_0x5bec4c=_0x4e676d[_0x3e3ea2(0xbb)])===null||_0x5bec4c===void 0x0?void 0x0:_0x5bec4c[_0x3e3ea2(0xdb)])===null||_0x199013===void 0x0?void 0x0:_0x199013[0x0])===null||_0xd3305c===void 0x0?void 0x0:_0xd3305c[_0x3e3ea2(0xb7)])||_0x3e3ea2(0xbc)});}}if(_0x4e676d===null||_0x4e676d===void 0x0?void 0x0:_0x4e676d[_0x3e3ea2(0xef)]){const _0x4b7eb6=(_0x29ec06=_0x43d0db===null||_0x43d0db===void 0x0?void 0x0:_0x43d0db[_0x3e3ea2(0xd5)])===null||_0x29ec06===void 0x0?void 0x0:_0x29ec06[_0x3e3ea2(0xcf)],_0x8912d=function(_0x5d7536,_0x29cbc4){const _0x334c5e=_0x3e3ea2;var _0x319645,_0x271036,_0x52422a,_0xe3427b,_0x2c07b4,_0x430264,_0x4f9602,_0xf43264,_0x242940,_0x228734,_0x437687;for(let _0x4eeb48 in _0x5d7536){if(_0x29cbc4[(_0x319645=_0x5d7536[_0x4eeb48])===null||_0x319645===void 0x0?void 0x0:_0x319645[_0x334c5e(0xa7)]]&&((_0x52422a=(_0x271036=_0x5d7536[_0x4eeb48])===null||_0x271036===void 0x0?void 0x0:_0x271036[_0x334c5e(0xe4)])===null||_0x52422a===void 0x0?void 0x0:_0x52422a[_0x334c5e(0xad)])){if(((_0x2c07b4=(_0xe3427b=_0x5d7536[_0x4eeb48])===null||_0xe3427b===void 0x0?void 0x0:_0xe3427b[_0x334c5e(0xe4)])===null||_0x2c07b4===void 0x0?void 0x0:_0x2c07b4[_0x334c5e(0xad)])==_0x334c5e(0xc2))_0x29cbc4[_0x5d7536[_0x4eeb48]['key']]=_0x8912d((_0x4f9602=(_0x430264=_0x5d7536[_0x4eeb48])===null||_0x430264===void 0x0?void 0x0:_0x430264[_0x334c5e(0xe4)][_0x334c5e(0xd5)])===null||_0x4f9602===void 0x0?void 0x0:_0x4f9602[_0x334c5e(0xcf)],_0x29cbc4[_0x5d7536[_0x4eeb48]['key']]);else{if(_0x5d7536[_0x4eeb48][_0x334c5e(0xe4)][_0x334c5e(0xad)]==_0x334c5e(0xab)&&_0x4e676d[_0x334c5e(0xef)][(_0xf43264=_0x5d7536[_0x4eeb48])===null||_0xf43264===void 0x0?void 0x0:_0xf43264[_0x334c5e(0xa7)]]){const _0x22614c=((_0x437687=(_0x228734=(_0x242940=_0x5d7536[_0x4eeb48])===null||_0x242940===void 0x0?void 0x0:_0x242940['schema'])===null||_0x228734===void 0x0?void 0x0:_0x228734[_0x334c5e(0xdf)])===null||_0x437687===void 0x0?void 0x0:_0x437687['format'])||_0x334c5e(0xc6);_0x29cbc4[_0x5d7536[_0x4eeb48]['key']]=dayjs(_0x4e676d[_0x334c5e(0xef)][_0x5d7536[_0x4eeb48][_0x334c5e(0xa7)]])[_0x334c5e(0xc9)](_0x22614c);}}}}return _0x29cbc4;};return _0x8912d(_0x4b7eb6,_0x4e676d[_0x3e3ea2(0xef)]);}throw new AnnError(ValidatorError_1[_0x3e3ea2(0xd6)][_0x3e3ea2(0xe8)]);}};__decorate([(0x0,core_1['Config'])(a8_0x5f527f(0xd4)),__metadata(a8_0x5f527f(0xd9),Object)],ValidatorService[a8_0x5f527f(0xb8)],a8_0x5f527f(0xac),void 0x0),__decorate([(0x0,core_1[a8_0x5f527f(0xaa)])(a8_0x5f527f(0xeb)),__metadata(a8_0x5f527f(0xd9),Object)],ValidatorService[a8_0x5f527f(0xb8)],a8_0x5f527f(0xf0),void 0x0),__decorate([(0x0,core_1[a8_0x5f527f(0xb5)])(),__metadata(a8_0x5f527f(0xd9),i18n_1['MidwayI18nServiceSingleton'])],ValidatorService[a8_0x5f527f(0xb8)],a8_0x5f527f(0xb0),void 0x0),__decorate([(0x0,core_1[a8_0x5f527f(0xe7)])(),__metadata('design:type',Function),__metadata(a8_0x5f527f(0xce),[]),__metadata(a8_0x5f527f(0xd8),Promise)],ValidatorService[a8_0x5f527f(0xb8)],a8_0x5f527f(0xdc),null),exports[a8_0x5f527f(0xb1)]=ValidatorService=__decorate([(0x0,core_1[a8_0x5f527f(0xb3)])(a8_0x5f527f(0xeb)),(0x0,core_1[a8_0x5f527f(0xcb)])(core_1[a8_0x5f527f(0xa6)]['Singleton'])],ValidatorService);function a8_0x29c3(){const _0x20fa5d=['validator','6514ajpEgk','6324689bSedbU','1126695AxIlOJ','value','validatorConfig','defineProperty','__decorate','ScopeEnum','key','locale','language','Config','date','i18nConfig','type','apply','getAvailableLocale','i18nService','ValidatorService','length','Provide','9wJoYxY','Inject','localeTable','message','prototype','validationOptions','getLocaleMapping','error','参数验证失败','(((.+)+)+)+$','search','13729470Mubiui','4164008DojlCO','92984MQimKO','object','getOwnPropertyDescriptor','forEach','toString','YYYY-MM-DD\x20HH:mm:ss','metadata','assign','format','getSchema','Scope','function','RULES_KEY','design:paramtypes','keys','constructor','formatLocale','getClassExtendedMetadata','27WRBxgW','i18n','$_terms','ValidatorError','defaultLocale','design:returntype','design:type','fromEntries','details','init','__esModule','decorate','_flags','NOFIND_SCHEMA','joi','validate','@midwayjs/core','schema','178kwCfYT','854148kGFTvQ','Init','PARAMS','isSchema','errors'];a8_0x29c3=function(){return _0x20fa5d;};return a8_0x29c3();}
|
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
|
+
"version": "3.2.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/core": "^3.
|
|
20
|
+
"@anncic-api/core": "^3.2.2",
|
|
21
21
|
"@joi/date": "^2.1.0",
|
|
22
|
-
"joi": "^17.
|
|
22
|
+
"joi": "^17.9.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/node": "^
|
|
26
|
-
"javascript-obfuscator": "^4.0.
|
|
27
|
-
"typescript": "^
|
|
25
|
+
"@types/node": "^20.3.2",
|
|
26
|
+
"javascript-obfuscator": "^4.0.2",
|
|
27
|
+
"typescript": "^5.1.3"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "d8e9e240cd6f80e8f635816ccbee04aa4daa96bd"
|
|
30
30
|
}
|