diff options
author | KAPIL SINGAL <ks220y@att.com> | 2020-08-24 19:10:03 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-24 19:10:03 +0000 |
commit | 6bf663a71fb034ff0961bd21404b23bd71de6289 (patch) | |
tree | ba0a02efd3fac4625d314a2162adfffd407cc56d /cds-ui/designer-client/src/app/modules | |
parent | 8b482c7a8deffc3a590b313d1b08a2b3235d772f (diff) | |
parent | 41b009542c0a079a3311831da928f6cd581f5eb2 (diff) |
Merge "change version regex"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules')
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()); } } |