diff options
author | 2020-08-24 13:40:31 +0200 | |
---|---|---|
committer | 2020-08-24 18:17:36 +0000 | |
commit | 41b009542c0a079a3311831da928f6cd581f5eb2 (patch) | |
tree | 433e52e8f19b9f3710ead80c41c178ba997ded36 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation | |
parent | 95ada73a261b82f31aecf4e23f4a87f464d806c5 (diff) |
change version regex
add tag with space click
Issue-ID: CCSDK-2437
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I366a97b39f7d2bdc77a99991a1fe4b6a17e07eaa
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation')
2 files changed, 5 insertions, 5 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 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 @@ <label class="label-name">Version <span>*</span></label> <div class="label-input"> <input type="input" [readOnly]="!packageNameAndVersionEnables" (change)="checkRequiredElements()" [(ngModel)]="metaDataTab.version" - (input)="validatePackageNameAndVersion()" [pattern]="versionPattern" placeholder="Example: 1.0.0"> + (input)="validatePackageNameAndVersion()" pattern="(\d+)\.(\d+)\.(\d+)" placeholder="Example: 1.0.0"> </div> <div class="model-note-container error-message">{{errorMessage}}</div> </div> @@ -59,9 +59,9 @@ <div class="single-line-model"> <label class="label-name">Tags</label> <div class="label-input"> - <input type="input" (keyup.enter)="addTag($event)" placeholder="Ex., vDNS-CDS"> + <input type="input" (keyup.enter)="addTag($event)" (keyup.Space)="addTag($event)" placeholder="Ex., vDNS-CDS"> </div> - <div class="model-note-container tag-notes">Use ENTER to add tag</div> + <div class="model-note-container tag-notes">Use ENTER/SPACE to add tag</div> <div class="model-note-container tages-container"> <span *ngFor="let tag of tags" class="single-tage">{{tag}} <i (click)="removeTag(tag)" class="fa fa-times-circle"></i> 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()); } } |