From: KrupaNagabhushan Date: Tue, 7 Feb 2023 10:03:36 +0000 (+0000) Subject: Service Import - general page validation X-Git-Tag: 1.12.2~21 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=59148be1a5a9beea5a157ace746eea3c969f5ed4;p=sdc.git Service Import - general page validation Issue-ID: SDC-4371 Signed-off-by: KrupaNagabhushan Change-Id: Ie7340a012feee413a622a8f6ed131f10be5e15e4 --- diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts index 8023ceecec..f550ccf355 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts @@ -760,6 +760,12 @@ export class GeneralViewModel { }); this.$scope.onCategoryChange = (): void => { + if (!this.$scope.component.selectedCategory) { + this.$scope.editForm['category'].$setDirty(); + } + if (!this.$scope.component.description) { + this.$scope.editForm['description'].$setDirty(); + } this.$scope.component.selectedCategory = this.$scope.componentCategories.selectedCategory; if (this.$scope.component.selectedCategory) { this.$scope.component.categories = this.convertCategoryStringToOneArray();