put validator.minLength in function in angular code example Example 1: validation minlength angular Validators.minLength(9) Example 2: angular number validation ng-pattern="re"