Skip to content

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)]),  
See also  Day of the Programmer - Hackerrank Challenge - C# Solution

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.