[AAE-2321] Should not be able to start a process with space as name (Process Services) (#5616)

* New regex validator for process name for checking if there is a space character as the first or the las one in the name.

* Added 2 new error messages for process name: Required and Pattern(no space in the beginning or the end). Changed the disabled start process button validation function.

* Unit test to disable the start button if the pattern validator for process name is raised.

* Added 2 new error messages for process start
This commit is contained in:
Urse Daniel
2020-04-18 01:37:49 +03:00
committed by GitHub
parent 3f69a6d3a9
commit bc2d7f16fd
4 changed files with 22 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ export class StartProcessInstanceComponent implements OnChanges, OnInit, OnDestr
}
ngOnInit() {
this.processNameInput = new FormControl(this.name, [Validators.required, Validators.maxLength(this.maxProcessNameLength)]);
this.processNameInput = new FormControl(this.name, [Validators.required, Validators.maxLength(this.maxProcessNameLength), Validators.pattern('^[^\\s]+(\\s+[^\\s]+)*$')]);
this.processDefinitionInput = new FormControl();
this.loadStartProcess();