mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user