summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src
diff options
context:
space:
mode:
authorShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-06-14 13:41:07 +0200
committerShaabanEltanany <shaaban.eltanany.ext@orange.com>2020-06-14 13:41:07 +0200
commitb2651335ea1908e3c843bb3b774a732e6eddb94f (patch)
tree8d44c5130ffd4e3b4a43a7de6184722eb3b7cd8c /cds-ui/designer-client/src
parent2fa007d45d0e9e6f38f56d7eb25ee5936f2b3c1d (diff)
add pattern for package version
Issue-ID: CCSDK-2436 Signed-off-by: ShaabanEltanany <shaaban.eltanany.ext@orange.com> Change-Id: Ie7558a384e482bfbc69404398b309906e7b148e0
Diffstat (limited to 'cds-ui/designer-client/src')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.html4
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/metadata-tab/metadata-tab.component.ts1
2 files changed, 3 insertions, 2 deletions
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 @@
<label class="label-name">Version <span>*</span></label>
<div class="label-input">
<input type="input" [readOnly]="!packageNameAndVersionEnables" [(ngModel)]="metaDataTab.version"
- (input)="validatePackageNameAndVersion()" placeholder="Example: 1.0.0">
+ (input)="validatePackageNameAndVersion()" [pattern]="versionPattern" placeholder="Example: 1.0.0">
</div>
<div class="model-note-container error-message">{{errorMessage}}</div>
</div>
@@ -120,4 +120,4 @@
</div>
</div>
-</div> \ No newline at end of file
+</div>
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,