Validator: break on first failed step to avoid further errors
This commit is contained in:
parent
66ec3c0b47
commit
4ab615c457
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "wms-core",
|
"name": "wms-core",
|
||||||
"version": "0.20.5-rc.3",
|
"version": "0.20.5-rc.4",
|
||||||
"description": "Node web application framework and toolbelt.",
|
"description": "Node web application framework and toolbelt.",
|
||||||
"repository": "https://gitlab.com/ArisuOngaku/wms-core",
|
"repository": "https://gitlab.com/ArisuOngaku/wms-core",
|
||||||
"author": "Alice Gaudon <alice@gaudon.pro>",
|
"author": "Alice Gaudon <alice@gaudon.pro>",
|
||||||
|
@ -44,6 +44,7 @@ export default class Validator<T> {
|
|||||||
error.thingName = thingName;
|
error.thingName = thingName;
|
||||||
error.value = value;
|
error.value = value;
|
||||||
bag.addMessage(error);
|
bag.addMessage(error);
|
||||||
|
break;
|
||||||
} else if (step.interrupt !== undefined && step.interrupt(value)) {
|
} else if (step.interrupt !== undefined && step.interrupt(value)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user