Data Type Workspace: Enable client mandatory field validation for configuration properties (#20799)

* 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.

* Pass validation property to umb-property component
This commit is contained in:
Mads Rasmussen
2025-12-01 17:03:14 +01:00
committed by GitHub
parent 0210e942ed
commit 18bbf5609b
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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}></umb-property>`,
.config=${property.config}
.validation=${property.validation}></umb-property>`,
)
: html`<umb-localize key="editdatatype_noConfiguration"
>There is no configuration for this property editor.</umb-localize