+
{{ getValidationPath() }}
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.html
index 2840aa87d2..60b3542d6c 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.html
@@ -5,7 +5,6 @@
{{block.label}}
-
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html
index 156f6caed3..a6085cd8c3 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html
@@ -1,14 +1,13 @@
-
-
-
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.propertyeditor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.propertyeditor.html
index 74a821e520..da6e466b50 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.propertyeditor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.propertyeditor.html
@@ -28,7 +28,7 @@
-
+
diff --git a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
index dcc662ff22..be30f2b92d 100644
--- a/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
+++ b/src/Umbraco.Web.UI.Client/test/unit/common/services/server-validation-manager.spec.js
@@ -316,19 +316,64 @@
describe('managing complex editor validation errors', function () {
- it('can retrieve validation errors for the property', function () {
+ it('create json paths for complex validation error', function () {
//arrange
- var complexValidationMsg = '{"nestedValidation":[{"textPage":{"title":[{"errorMessage":"WRONG!","memberNames":["innerFieldId"]}]}}]}';
- serverValidationManager.addPropertyError("myProperty", null, null, complexValidationMsg, null);
+ var complexValidationMsg = `[
+ {
+ "$elementTypeAlias": "addressBook",
+ "$id": "34E3A26C-103D-4A05-AB9D-7E14032309C3",
+ "addresses":
+ [
+ {
+ "$elementTypeAlias": "addressInfo",
+ "$id": "FBEAEE8F-4BC9-43EE-8B81-FCA8978850F1",
+ "ModelState":
+ {
+ "_Properties.city.invariant.null.country": [
+ "City is not in Australia"
+ ],
+ "_Properties.city.invariant.null.capital": [
+ "Not a capital city"
+ ]
+ }
+ },
+ {
+ "$elementTypeAlias": "addressInfo",
+ "$id": "7170A4DD-2441-4B1B-A8D3-437D75C4CBC9",
+ "ModelState":
+ {
+ "_Properties.city.invariant.null.country": [
+ "City is not in Australia"
+ ],
+ "_Properties.city.invariant.null.capital": [
+ "Not a capital city"
+ ]
+ }
+ }
+ ],
+ "ModelState":
+ {
+ "_Properties.addresses.invariant.null.counter": [
+ "Must have at least 3 addresses"
+ ],
+ "_Properties.bookName.invariant.null.book": [
+ "Invalid address book name"
+ ]
+ }
+ }
+]`;
//act
- var err1 = serverValidationManager.getPropertyError("myProperty", null, null, null);
+ var ids = serverValidationManager.parseComplexEditorError(complexValidationMsg);
- //assert
- expect(err1).not.toBeUndefined();
- expect(err1.propertyAlias).toEqual("myProperty");
- expect(err1.errorMsg).toEqual(complexValidationMsg);
+ //assert
+ var keys = Object.keys(ids);
+
+ expect(keys.length).toEqual(3);
+ expect(keys[0]).toEqual("34E3A26C-103D-4A05-AB9D-7E14032309C3");
+ expect(keys[1]).toEqual("FBEAEE8F-4BC9-43EE-8B81-FCA8978850F1");
+ expect(keys[2]).toEqual("7170A4DD-2441-4B1B-A8D3-437D75C4CBC9");
});