MaxLengthValidator directive    npm Package @angular/forms   Module import { MaxLengthValidator } from '@angular/forms';   Source forms/src/directives/validators.ts    Overview @Directive({
    selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',
    providers: [MAX_LENGTH_VALIDATOR],
    host: { '[attr.maxlength]': 'maxlength ? maxlength : null' }
})
class MaxLengthValidator implements Validator, OnChanges {
  maxlength: string
  ngOnChanges(changes: SimpleChanges): void
  validate(c: AbstractControl): ValidationErrors | null
  registerOnValidatorChange(fn: () => void): void
} Selectors [maxlength][formControlName]
  [maxlength][formControl]
  [maxlength][ngModel] Inputs  maxlength bound to MaxLengthValidator.maxlength  Description A directive which installs the MaxLengthValidator for any formControlName,formControl, or control withngModelthat also has amaxlength` attribute. Members maxlength: string ngOnChanges(changes: SimpleChanges): void validate(c: AbstractControl): ValidationErrors | null registerOnValidatorChange(fn: () => void): void

    
{'path': 'public/docs/angular~5/api/forms/maxlengthvalidator.html', 'source': 'DevDocs.IO'}