title: ng-maxlength not working
body: <p>I have an Angular 4 Application. I am trying to add validation to form inputs, where inputs with numbers should not accept more than 4 digits. If more, it should invalid the form. I am using reactive forms. This is the code.</p>
  
  <pre><code>&lt;input class="form-control form-control-amount no-z-index"
       id="forNumber"
       name="forNumber"
       formControlName="forNumber"
       ng-required="true"
       type="number"
       ng-maxlength="4" 
       [(ngModel)]="saveNumber"
      [attr.disabled]="!condition? 'disabled': null "
      #forNumber
    &gt;  
  
  &lt;small class="alert alert-danger" *ngIf="!form.get('forNumber').valid"&gt;
        Invalid input.
   &lt;/small&gt;
  </code></pre>
  
  <p>If I enter 11111 it should invalid the entry and should print above alert message; which is not happening.
  Any idea what's going wrong here? Thanks.</p>