form control validation max number angular code example Example 1: validation maxlength angular Validators.maxLength(11) Example 2: angular number validation ng-pattern="re"