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/28 10:37:21 UTC
[incubator-dlab] branch DLAB-1005 created (now 42eb4c8)
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a change to branch DLAB-1005
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.
at 42eb4c8 [DLAB-1005]: debug spec char duplication
This branch includes the following new commits:
new 42eb4c8 [DLAB-1005]: debug spec char duplication
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org
[incubator-dlab] 01/01: [DLAB-1005]: debug spec char duplication
Posted by an...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
ankovalyshyn pushed a commit to branch DLAB-1005
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 42eb4c8e23c6af2d826edee1e1bd409b3a799151
Author: Andriana Kovalyshyn <An...@epam.com>
AuthorDate: Wed Aug 28 13:37:02 2019 +0300
[DLAB-1005]: debug spec char duplication
---
.../project/project-form/project-form.component.ts | 9 ++++++++-
.../src/main/resources/webapp/src/app/core/util/patterns.ts | 3 ++-
2 files changed, 10 insertions(+), 2 deletions(-)
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 091d946..538f696 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
@@ -128,7 +128,7 @@ export class ProjectFormComponent implements OnInit {
private initFormModel(): void {
this.projectForm = this._fb.group({
'key': ['', Validators.required],
- 'name': ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern), this.checkDuplication.bind(this), this.providerMaxLength.bind(this)])],
+ 'name': ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.double), this.checkDuplication.bind(this), this.providerMaxLength.bind(this), this.checkCheck.bind(this)])],
'endpoints': [[], Validators.required],
'tag': ['', Validators.compose([Validators.required, Validators.pattern(PATTERNS.namePattern)])],
'groups': [[], Validators.required]
@@ -182,4 +182,11 @@ export class ProjectFormComponent implements OnInit {
private providerMaxLength(control) {
return control.value.length <= DICTIONARY.max_project_name_length ? null : { limit: true };
}
+
+ private checkCheck(control) {
+ debugger;
+
+ if (RegExp(PATTERNS.double).test(control.value))
+ debugger;
+ }
}
diff --git a/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts b/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
index 0d54fef..f41d854 100644
--- a/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/core/util/patterns.ts
@@ -19,7 +19,8 @@
export const PATTERNS = {
namePattern: '[-_a-zA-Z0-9]*[_-]*[a-zA-Z0-9]+',
- // noDoubleDush: '(([-_A-Za-z0-9])(?!\2))+',
+ // noDoubleDush: '([-_A-Za-z0-9])(?!\2)+',
+ double: '[\w\-]+?(\-\-|__)[\w\-]+',
delimitersRegex: '/[-_]?/g',
url: '[a-zA-Z0-9.://%#&\\.@:%-_\+~#=]*\.[^\s]*[a-zA-Z0-9]+',
nodeCountPattern: '^[1-9]\\d*$',
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org