From 41b009542c0a079a3311831da928f6cd581f5eb2 Mon Sep 17 00:00:00 2001 From: Ahmedeldeeb50 Date: Mon, 24 Aug 2020 13:40:31 +0200 Subject: change version regex add tag with space click Issue-ID: CCSDK-2437 Signed-off-by: Ahmedeldeeb50 Change-Id: I366a97b39f7d2bdc77a99991a1fe4b6a17e07eaa --- .../package-creation/metadata-tab/metadata-tab.component.html | 6 +++--- .../package-creation/metadata-tab/metadata-tab.component.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cds-ui/designer-client/src') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html index 9bd08b7cb..e77356d6c 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html @@ -45,7 +45,7 @@
+ (input)="validatePackageNameAndVersion()" pattern="(\d+)\.(\d+)\.(\d+)" placeholder="Example: 1.0.0">
{{errorMessage}}
@@ -59,9 +59,9 @@
- +
-
Use ENTER to add tag
+
Use ENTER/SPACE to add tag
{{tag}} diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts index a9f613187..4e0e5c977 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts @@ -22,7 +22,7 @@ export class MetadataTabComponent implements OnInit { modeType = this.modes[0].name; metaDataTab: MetaDataTabModel = new MetaDataTabModel(); errorMessage: string; - versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; + versionPattern = '(\d+)\.(\d+)\.(\d+)'; constructor( private route: ActivatedRoute, @@ -74,7 +74,7 @@ export class MetadataTabComponent implements OnInit { console.log(value); if (value && value.trim().length > 0) { event.target.value = ''; - this.tags.add(value); + this.tags.add(value.trim()); } } -- cgit 1.2.3-korg