From 4ab615c4576b783408b8be1c64b51449d0bf20c1 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 26 Aug 2020 15:02:09 +0200 Subject: [PATCH] Validator: break on first failed step to avoid further errors --- package.json | 2 +- src/db/Validator.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index c5c4508..df9a3be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wms-core", - "version": "0.20.5-rc.3", + "version": "0.20.5-rc.4", "description": "Node web application framework and toolbelt.", "repository": "https://gitlab.com/ArisuOngaku/wms-core", "author": "Alice Gaudon ", diff --git a/src/db/Validator.ts b/src/db/Validator.ts index 14fb394..6be3454 100644 --- a/src/db/Validator.ts +++ b/src/db/Validator.ts @@ -44,6 +44,7 @@ export default class Validator { error.thingName = thingName; error.value = value; bag.addMessage(error); + break; } else if (step.interrupt !== undefined && step.interrupt(value)) { break; }