You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by an...@apache.org on 2019/08/09 11:02:59 UTC

[incubator-dlab] 02/03: [DLAB-829]: changed model validation

This is an automated email from the ASF dual-hosted git repository.

ankovalyshyn pushed a commit to branch DLAB-829
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 51c0498d0889992dced5e7f49ab91ef3e02df741
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Fri Aug 9 13:02:03 2019 +0200

    [DLAB-829]: changed model validation
---
 .../administration/project/project-form/project-form.component.ts    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
index 26d50c5..62e6287 100644
--- a/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/administration/project/project-form/project-form.component.ts
@@ -26,6 +26,7 @@ import { ProjectService, RolesGroupsService, EndpointService } from '../../../co
 import { ProjectDataService } from '../project-data.service';
 import { CheckUtils, PATTERNS } from '../../../core/util';
 import { Project } from '../project.component';
+import { DICTIONARY } from '../../../../dictionary/global.dictionary';
 
 @Component({
   selector: 'project-form',
@@ -34,6 +35,8 @@ import { Project } from '../project.component';
 })
 export class ProjectFormComponent implements OnInit {
 
+  readonly DICTIONARY = DICTIONARY;
+
   public projectForm: FormGroup;
   public groupsList: any = [];
   public endpointsList: any = [];
@@ -178,6 +181,6 @@ export class ProjectFormComponent implements OnInit {
   }
 
   private providerMaxLength(control) {
-    return control.value.length <= 50 ? null : { limit: true };
+    return control.value.length <= DICTIONARY.max_project_name_length ? null : { limit: true };
   }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org