diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/validation.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/validation.controller.ts index 6e497a22e7..d8231bc11d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/validation.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/validation.controller.ts @@ -172,9 +172,6 @@ export class UmbValidationController extends UmbControllerBase implements UmbVal setDataPath(dataPath: string): void { if (this.#baseDataPath) { if (this.#baseDataPath === dataPath) return; - // Just fire an error, as I haven't made the right clean up jet. Or haven't thought about what should happen if it changes while already setup. - // cause maybe all the messages should be removed as we are not interested in the old once any more. But then on the other side, some might be relevant as this is the same entity that changed its paths? - throw new Error('Data path is already set, we do not support changing the context data-path as of now.'); } if (!dataPath) { this.#stopInheritance(); @@ -197,12 +194,12 @@ export class UmbValidationController extends UmbControllerBase implements UmbVal this.#parent.removeValidator(this); } this.#parent = parent; - this.#readyToSync(); this.messages.clear(); this.#localMessages = undefined; this.#baseDataPath = dataPath; + this.#readyToSync(); // @deprecated - Will be removed in v.17 this.observe(