This commit is contained in:
2019-04-03 00:04:44 +00:00
parent e4837d44a4
commit c4a495bb9a
3 changed files with 67 additions and 14 deletions

View File

@@ -332,7 +332,7 @@ Here are all the API level error codes that can be returned by the API server:
//Keep top part if statement for gathering all overall errors, but then also run the field errors block and check for field errors where "target" is empty and add them in to the return as well
//GENERAL ERROR
if (ref == "errorbox") {
if (ref == "errorbox") {
//Add any general errors to ret
var err = v.$gzlocale.get("ErrorAPI" + apiErrorCode.toString());
if (v.serverError.message) {
@@ -347,7 +347,7 @@ Here are all the API level error codes that can be returned by the API server:
//See if this key is in the details array
var errorsForField = [];
if (ref == "errorbox") {
if (ref == "errorbox") {
errorsForField = v.$_.filter(v.serverError.details, function(o) {
return !o.target;
});
@@ -408,8 +408,11 @@ Here are all the API level error codes that can be returned by the API server:
// ERROR BOX ERRORS
// displays any messages for error box on form which is the generic catch all for non field specific errors from server
ErrorBoxErrors(v) {
console.log("gzvalidate::ErrorBoxErrors called...");
console.log(v);
var errs = this.ServerErrors(v, "errorbox");
if (errs.length < 1) {
console.log("gzvalidate::ErrorBoxErrors - RETURN NO ERRORS, short circuit return");
return null;
}
@@ -418,7 +421,8 @@ Here are all the API level error codes that can be returned by the API server:
for (var i = 0; i < errs.length; i++) {
ret += errs[i] + "\r\n";
}
ret=ret.replace("\r\n"," <br/> ");
// ret=ret.replace("\r\n"," <br/> ");
console.log("gzvalidate::ErrorBoxErrors - RETURN WITH ERRORS");
return ret;
}
};