From ace6ce1119588bdbc2a8a1859feb9db0d07ddae4 Mon Sep 17 00:00:00 2001 From: amentis Date: Thu, 18 Jan 2024 11:59:42 +0200 Subject: [PATCH] fix dmp blueprint editor validators --- .../dmp-blueprint-editor.component.html | 29 ++-- .../editor/dmp-blueprint-editor.component.ts | 49 +++++-- .../editor/dmp-blueprint-editor.model.ts | 130 +++++++++++++++++- 3 files changed, 181 insertions(+), 27 deletions(-) diff --git a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html index 765abfb72..bfa801bce 100644 --- a/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/dmp-blueprint/editor/dmp-blueprint-editor.component.html @@ -39,8 +39,8 @@ {{'DMP-BLUEPRINT-EDITOR.FIELDS.NAME' | translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{formGroup.get('label').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}}

{{'DMP-BLUEPRINT-EDITOR.FIELDS.SECTIONS' | translate}}

@@ -69,16 +69,16 @@ {{'DMP-BLUEPRINT-EDITOR.FIELDS.SECTION-NAME' | translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{section.get('label').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
{{'DMP-BLUEPRINT-EDITOR.FIELDS.SECTION-DESCRIPTION' | translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{section.get('description').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
@@ -119,32 +119,35 @@ {{enumUtils.toDmpBlueprintExtraFieldDataTypeString(extraFieldDataType)}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{field.get('dataType').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
{{'DMP-BLUEPRINT-EDITOR.FIELDS.FIELD-LABEL' | translate}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} + {{field.get('label').getError('backendError').message}} + {{'GENERAL.VALIDATION.REQUIRED' | translate}}
{{'DMP-BLUEPRINT-EDITOR.FIELDS.FIELD-PLACEHOLDER' | translate}} + {{field.get('placeholder').getError('backendError').message}}
{{'DMP-BLUEPRINT-EDITOR.FIELDS.FIELD-DESCRIPTION' | translate}} + {{field.get('description').getError('backendError').message}}
{{'DMP-BLUEPRINT-EDITOR.FIELDS.FIELD-REQUIRED' | translate}} + {{field.get('systemFieldType').getError('backendError').message}}