From ef69f16c2d8adccedd149ba08f120031b3897762 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 12 Nov 2025 08:32:33 +0100 Subject: [PATCH 1/2] Add validation property to PropertyEditorSettingsProperty Introduces a 'validation' field to the PropertyEditorSettingsProperty interface, allowing configuration of mandatory status and custom mandatory messages for property editor settings. --- .../property-editor/extensions/property-editor.extension.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/extensions/property-editor.extension.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/extensions/property-editor.extension.ts index 31ff43ed7b4a..3185e282c262 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/extensions/property-editor.extension.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-editor/extensions/property-editor.extension.ts @@ -69,6 +69,10 @@ export interface PropertyEditorSettingsProperty { propertyEditorDataSourceAlias?: string; config?: UmbPropertyEditorConfig; weight?: number; + validation?: { + mandatory: boolean; + mandatoryMessage?: string | null; + }; } // eslint-disable-next-line @typescript-eslint/naming-convention From bbf04eedeff3cd2cc632dba440d256964be03de1 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 12 Nov 2025 08:32:57 +0100 Subject: [PATCH 2/2] Pass validation property to umb-property component --- .../property-editor-config/property-editor-config.element.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/data-type/components/property-editor-config/property-editor-config.element.ts b/src/Umbraco.Web.UI.Client/src/packages/data-type/components/property-editor-config/property-editor-config.element.ts index 4ee552be0c88..8f3024744870 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/data-type/components/property-editor-config/property-editor-config.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/data-type/components/property-editor-config/property-editor-config.element.ts @@ -52,7 +52,8 @@ export class UmbPropertyEditorConfigElement extends UmbLitElement { alias=${property.alias} property-editor-ui-alias=${property.propertyEditorUiAlias} property-editor-data-source-alias=${ifDefined(property.propertyEditorDataSourceAlias)} - .config=${property.config}>`, + .config=${property.config} + .validation=${property.validation}>`, ) : html`There is no configuration for this property editor.