diff options
Diffstat (limited to 'cds-ui/designer-client/src/app')
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()); } } |