Add two validators to form control in Angular form groups
msgInput: new FormControl("", [Validators.required, Validators.minLength(5)]), // or hostname: ['', Validator.compose([Validators.required, Validators.pattern(this.unamePattern)]),
msgInput: new FormControl("", [Validators.required, Validators.minLength(5)]), // or hostname: ['', Validator.compose([Validators.required, Validators.pattern(this.unamePattern)]),