From d25b39282d2a49e4e5cf286100344e7d1fda3c84 Mon Sep 17 00:00:00 2001 From: Lukas Hroch <223967+lukashroch@users.noreply.github.com> Date: Mon, 25 Oct 2021 07:50:29 +0100 Subject: [PATCH] fix(validators): allow any values for isIn/notIn (#1124) --- package-lock.json | 14 +++++++------- package.json | 4 ++-- src/validation/is-in.ts | 2 +- src/validation/not-in.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 416c86ee..099017b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,7 +48,7 @@ "prettyjson": "1.2.1", "reflect-metadata": "0.1.13", "release-it": "14.11.6", - "sequelize": "6.6.5", + "sequelize": "6.8.0", "sinon": "11.1.2", "sinon-chai": "3.7.0", "source-map-support": "0.5.20", @@ -8426,9 +8426,9 @@ "dev": true }, "node_modules/sequelize": { - "version": "6.6.5", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.6.5.tgz", - "integrity": "sha512-QyRrJrDRiwuiILqTMHUA1yWOPIL12KlfmgZ3hnzQwbMvp2vJ6fzu9bYJQB+qPMosck4mBUggY4Cjoc6Et8FBIQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.8.0.tgz", + "integrity": "sha512-tekqSMoEuhlXfc9f/WduQr+9CS87bPWw/GKEvd+zMlOlMVFOzNx9PecQV+McjA7OUNUa1YGyPEt+Fe8baXST5A==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -16360,9 +16360,9 @@ "dev": true }, "sequelize": { - "version": "6.6.5", - "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.6.5.tgz", - "integrity": "sha512-QyRrJrDRiwuiILqTMHUA1yWOPIL12KlfmgZ3hnzQwbMvp2vJ6fzu9bYJQB+qPMosck4mBUggY4Cjoc6Et8FBIQ==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-6.8.0.tgz", + "integrity": "sha512-tekqSMoEuhlXfc9f/WduQr+9CS87bPWw/GKEvd+zMlOlMVFOzNx9PecQV+McjA7OUNUa1YGyPEt+Fe8baXST5A==", "dev": true, "requires": { "debug": "^4.1.1", diff --git a/package.json b/package.json index b3cc196f..38c18055 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "prettyjson": "1.2.1", "reflect-metadata": "0.1.13", "release-it": "14.11.6", - "sequelize": "6.6.5", + "sequelize": "6.8.0", "sinon": "11.1.2", "sinon-chai": "3.7.0", "source-map-support": "0.5.20", @@ -144,6 +144,6 @@ "@types/node": "*", "@types/validator": "*", "reflect-metadata": "*", - "sequelize": ">=6.6.5" + "sequelize": ">=6.8.0" } } diff --git a/src/validation/is-in.ts b/src/validation/is-in.ts index 1c2ce426..218cb06e 100644 --- a/src/validation/is-in.ts +++ b/src/validation/is-in.ts @@ -3,7 +3,7 @@ import { addAttributeOptions } from '../model/column/attribute-service'; /** * Check the value is one of these */ -export function IsIn(arg: string[][] | { msg: string; args: string[][] }): Function { +export function IsIn(arg: any[][] | { msg: string; args: any[][] }): Function { return (target: any, propertyName: string) => addAttributeOptions(target, propertyName, { validate: { diff --git a/src/validation/not-in.ts b/src/validation/not-in.ts index 49bdbb7a..b8c20fed 100644 --- a/src/validation/not-in.ts +++ b/src/validation/not-in.ts @@ -3,7 +3,7 @@ import { addAttributeOptions } from '../model/column/attribute-service'; /** * Check the value is not one of these */ -export function NotIn(arg: string[][] | { msg: string; args: string[][] }): Function { +export function NotIn(arg: any[][] | { msg: string; args: any[][] }): Function { return (target: any, propertyName: string) => addAttributeOptions(target, propertyName, { validate: {