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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user