diff --git a/projects/WebMVC/wwwroot/router/shared/edit.html b/projects/WebMVC/wwwroot/router/shared/edit.html index e4b77eab..6c07abe1 100644 --- a/projects/WebMVC/wwwroot/router/shared/edit.html +++ b/projects/WebMVC/wwwroot/router/shared/edit.html @@ -146,15 +146,15 @@ } } axios.get(url).then(function (response) { - if (response.data !== true) { - vm.updateError(name, 'error'); - } + //if (response.data !== true) { + // vm.updateError(name, 'error'); + //} resolve(response.data === true); }).catch(function () { - vm.updateError(name, 'error'); + //vm.updateError(name, 'error'); resolve(false); }); - }), 'error') + })) ); } return Promise.all(list); diff --git a/projects/WebMVC/wwwroot/test.html b/projects/WebMVC/wwwroot/test.html index f22f9b8b..2704fea7 100644 --- a/projects/WebMVC/wwwroot/test.html +++ b/projects/WebMVC/wwwroot/test.html @@ -20,6 +20,15 @@ } return Promise.all(list); }, + validInternal: function (schema, model, propName) { + var list = []; + var prop = schema.properties[propName]; + for (var ruleIndex in prop.rules) { + var rule = prop.rules[ruleIndex]; + list.push(this[rule.name](model, propName, rule)); + } + return Promise.all(list); + }, addError: function (propName, name, message) { var prop = this.errors.find(o => o.name === propName); if (!prop) {