This commit is contained in:
2019-04-03 23:13:16 +00:00
parent c450006448
commit 4de7ed8a88
3 changed files with 26 additions and 34 deletions

View File

@@ -105,17 +105,12 @@ function logControl(caller, ctrl, ref) {
ctrl.lazyValue +
", initialValue=" +
ctrl.initialValue +
", loading=" +
ctrl.loading +
", isDirty=" +
ctrl.isDirty +
", isResetting=" +
ctrl.isResetting +
", HAS CHANGED =" +
hasChanged;
@@ -362,10 +357,6 @@ export default {
return ret;
}
} else {
if (v.$gzdevmode()) {
throw "DEV ERROR gzvalidate::ServerErrors -> on field validation error no 'details' key was found to show which field had the error";
}
}
}
@@ -476,5 +467,17 @@ Here are all the API level error codes that can be returned by the API server:
// console.log("gzvalidate::ErrorBoxErrors - RETURN WITH ERRORS");
return ret;
},
///////////////////////////////
// On Change handler
// This is required so that server errors can be cleared when input is changed
Change(v, ref) {
//If ref appears in the servererrors details collection, remove each one
var m = v.$_.remove(v.serverError.details, function(o) {
return o.target == ref;
});
console.log("Removed:");
console.log(m);
}
};