From 7a45cb9721fcee3549e71cb9fbfe0a4919d4191e Mon Sep 17 00:00:00 2001 From: Yannick Cordinier Date: Thu, 23 Feb 2017 12:20:02 -0500 Subject: [PATCH] Bugfix: when type is numeric value 0 should valid --- README.md | 2 +- js/ParamValidation.js | 1 + js/ParamValidation.js.map | 2 +- js/RequestValidator.js | 16 ++++++++++++++-- js/RequestValidator.js.map | 2 +- js/index.js | 1 + js/index.js.map | 2 +- tests/unit/RequestValidator.ts | 29 +++++++++++++++++++++++++++++ ts/RequestValidator.ts | 10 ++++++++-- 9 files changed, 57 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e68ad67..fbaa4ff 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ validation: { ##### Auto formatting -By default, every `numeric` and `date` inputs will be automatically transformed respectively to valid `number` and `Date` objects after validation. So you can directly use valid objects in your code. +By default, every `numeric`, `date` and `boolean` inputs will be automatically transformed respectively to valid `number`, `Date` and `boolean` objects after validation. So you can directly use valid objects in your code. ##### Extra formatting, data transformation diff --git a/js/ParamValidation.js b/js/ParamValidation.js index ac04920..e82fe4f 100644 --- a/js/ParamValidation.js +++ b/js/ParamValidation.js @@ -1,4 +1,5 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); var ParamValidation = (function () { function ParamValidation() { this.required = false; diff --git a/js/ParamValidation.js.map b/js/ParamValidation.js.map index 71fdea9..0a434fc 100644 --- a/js/ParamValidation.js.map +++ b/js/ParamValidation.js.map @@ -1 +1 @@ -{"version":3,"file":"ParamValidation.js","sourceRoot":"","sources":["../ts/ParamValidation.ts"],"names":[],"mappings":";AAAA;IAAA;QAEW,aAAQ,GAAY,KAAK,CAAC;QAC1B,QAAG,GAAW,CAAC,CAAC;QAChB,QAAG,GAAW,IAAI,CAAC;QACnB,WAAM,GAAW,IAAI,CAAC;QACtB,cAAS,GAAW,IAAI,CAAC;QACzB,WAAM,GAAU,IAAI,CAAC;QACrB,UAAK,GAAW,IAAI,CAAC;QAErB,aAAQ,GAAQ,KAAK,CAAC;IACjC,CAAC;IAAD,sBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,0CAAe"} \ No newline at end of file +{"version":3,"file":"ParamValidation.js","sourceRoot":"","sources":["../ts/ParamValidation.ts"],"names":[],"mappings":";;AAAA;IAAA;QAEW,aAAQ,GAAY,KAAK,CAAC;QAC1B,QAAG,GAAW,CAAC,CAAC;QAChB,QAAG,GAAW,IAAI,CAAC;QACnB,WAAM,GAAW,IAAI,CAAC;QACtB,cAAS,GAAW,IAAI,CAAC;QACzB,WAAM,GAAU,IAAI,CAAC;QACrB,UAAK,GAAW,IAAI,CAAC;QAErB,aAAQ,GAAQ,KAAK,CAAC;IACjC,CAAC;IAAD,sBAAC;AAAD,CAAC,AAXD,IAWC;AAXY,0CAAe"} \ No newline at end of file diff --git a/js/RequestValidator.js b/js/RequestValidator.js index c20e6c3..0f369ce 100644 --- a/js/RequestValidator.js +++ b/js/RequestValidator.js @@ -1,4 +1,5 @@ "use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); var ParamValidation_1 = require("./ParamValidation"); var supportedTypes = ['string', 'number', 'boolean', 'numeric', 'date', 'array', 'object']; var supportedArrayTypes = ['string', 'number', 'boolean', 'numeric']; @@ -209,7 +210,14 @@ var RequestValidator = (function () { if (inputType === 'undefined' || typeValidation.value === null) { return true; } - else if (typeValidation.type === 'numeric' || typeValidation.type === 'number') { + else if (typeValidation.type === 'numeric') { + var isNumeric = !(typeValidation.value.length === 0) && !isNaN(typeValidation.value); + if (isNumeric === true) { + typeValidation.value = parseInt(typeValidation.value, 10); + } + return isNumeric; + } + else if (typeValidation.type === 'number') { var isNumeric = !isNaN(typeValidation.value); if (isNumeric === true) { typeValidation.value = parseInt(typeValidation.value, 10); @@ -217,7 +225,11 @@ var RequestValidator = (function () { return isNumeric; } else if (typeValidation.type === 'boolean') { - return ['0', '1', 'false', 'true', false, true, 0, 1].indexOf(typeValidation.value) !== -1; + var isBoolean = ['0', '1', 'false', 'true', false, true, 0, 1].indexOf(typeValidation.value) !== -1; + if (isBoolean === true) { + typeValidation.value = ['1', 'true', true, 1].indexOf(typeValidation.value) !== -1; + } + return isBoolean; } else if (typeValidation.type === 'date') { if (typeof typeValidation.value === 'object' && typeof typeValidation.value.getTime === 'function') { diff --git a/js/RequestValidator.js.map b/js/RequestValidator.js.map index a62a2ef..3549d92 100644 --- a/js/RequestValidator.js.map +++ b/js/RequestValidator.js.map @@ -1 +1 @@ -{"version":3,"file":"RequestValidator.js","sourceRoot":"","sources":["../ts/RequestValidator.ts"],"names":[],"mappings":";AAAA,qDAAkD;AAElD,IAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC7F,IAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAcvE;IAKI,0BAAY,YAAyB;QAAzB,6BAAA,EAAA,oBAAyB;QAH7B,qBAAgB,GAAY,IAAI,CAAC;QAIrC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACrC,CAAC;IAEM,kDAAuB,GAA9B;QACI,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAES,0CAAe,GAAzB,UAA0B,KAAa,EAAE,SAAiB,EAAE,cAAsB;QAC9E,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC9G,MAAM,CAAC;gBACH,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;gBACnD,UAAU,EAAE,SAAS;gBACrB,QAAQ,EAAE,IAAI;aACjB,CAAC;QACN,CAAC;QACD,MAAM,CAAC;YACH,OAAO,EAA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,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC;YACzB,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;QAC/B,CAAC;QACD,MAAM,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC;YACnB,KAAK,WAAW;gBACZ,MAAM,CAAC,IAAI,CAAC;YAChB,KAAK,QAAQ;gBACT,MAAM,CAAC,KAAK,IAAI,GAAG,CAAC;YACxB,KAAK,QAAQ;gBACT,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,GAAG,CAAC;YAC/B;gBACI,MAAM,CAAC,IAAI,CAAC;QACpB,CAAC;IACL,CAAC;IAEc,4BAAW,GAA1B,UAA2B,KAAU,EAAE,MAAa;QAChD,EAAE,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,EAAE,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC;YACzB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;gBACvC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;oBAC/B,MAAM,CAAC,KAAK,CAAC;gBACjB,CAAC;YACL,CAAC;YACD,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACL,uBAAC;AAAD,CAAC,AAnZD,IAmZC;AAnZY,4CAAgB"} \ No newline at end of file +{"version":3,"file":"RequestValidator.js","sourceRoot":"","sources":["../ts/RequestValidator.ts"],"names":[],"mappings":";;AAAA,qDAAkD;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YACD,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACL,uBAAC;AAAD,CAAC,AA7ZD,IA6ZC;AA7ZY,4CAAgB"} \ No newline at end of file diff --git a/js/index.js b/js/index.js index 9e1e743..a201bf5 100644 --- a/js/index.js +++ b/js/index.js @@ -2,6 +2,7 @@ function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } +Object.defineProperty(exports, "__esModule", { value: true }); __export(require("./RequestValidator")); __export(require("./ParamValidation")); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/js/index.js.map b/js/index.js.map index c868bab..e7eae34 100644 --- a/js/index.js.map +++ b/js/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;;;AAAA,wCAAmC;AACnC,uCAAkC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;;;;AAAA,wCAAmC;AACnC,uCAAkC"} \ No newline at end of file diff --git a/tests/unit/RequestValidator.ts b/tests/unit/RequestValidator.ts index 2af21b0..bb3aead 100644 --- a/tests/unit/RequestValidator.ts +++ b/tests/unit/RequestValidator.ts @@ -222,6 +222,35 @@ describe('RequestValidator', () => { ); }); + it('RequestValidator::validate() numeric', () => { + expected = undefined; + validator.validate( + { + route: { + validation: { + query: { + id: {type: 'numeric', required: false} + } + } + }, query: {id: '1'} + }, + null, test + ); + expected = undefined; + validator.validate( + { + route: { + validation: { + query: { + id: {type: 'numeric', required: false, min: 0} + } + } + }, query: {id: '0'} + }, + null, test + ); + }); + it('RequestValidator::validate() null values', () => { expected = undefined; validator.validate( diff --git a/ts/RequestValidator.ts b/ts/RequestValidator.ts index ef6c37c..5fe3818 100644 --- a/ts/RequestValidator.ts +++ b/ts/RequestValidator.ts @@ -308,8 +308,14 @@ export class RequestValidator { if (inputType === 'undefined' || typeValidation.value === null) { return true; - } else if (typeValidation.type === 'numeric' || typeValidation.type === 'number') { - const isNumeric = !isNaN(typeValidation.value); + } else if (typeValidation.type === 'numeric') { + const isNumeric = !(typeValidation.value.length === 0) && !isNaN(typeValidation.value) ; + if (isNumeric === true) { + typeValidation.value = parseInt(typeValidation.value, 10); + } + return isNumeric; + } else if (typeValidation.type === 'number') { + const isNumeric = !isNaN(typeValidation.value) ; if (isNumeric === true) { typeValidation.value = parseInt(typeValidation.value, 10); }