From b2651335ea1908e3c843bb3b774a732e6eddb94f Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Sun, 14 Jun 2020 13:41:07 +0200 Subject: add pattern for package version Issue-ID: CCSDK-2436 Signed-off-by: ShaabanEltanany Change-Id: Ie7558a384e482bfbc69404398b309906e7b148e0 --- .../package-creation/metadata-tab/metadata-tab.component.html | 4 ++-- .../packages/package-creation/metadata-tab/metadata-tab.component.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'cds-ui') 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 50d9eea08..d73f7da76 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]="versionPattern" placeholder="Example: 1.0.0">
{{errorMessage}}
@@ -120,4 +120,4 @@ - \ No newline at end of file + 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 6018ad535..204d76fdb 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,6 +22,7 @@ export class MetadataTabComponent implements OnInit { modeType = this.modes[0].name; private metaDataTab: MetaDataTabModel = new MetaDataTabModel(); private errorMessage: string; + versionPattern = '^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$'; constructor( private route: ActivatedRoute, -- cgit 1.2.3-korg