MaxLengthValidator

Stable Directive

Class Overview

class MaxLengthValidator {
  maxlength : string
  ngOnChanges(changes: SimpleChanges)
  validate(c: AbstractControl) : {[key: string]: any}
  registerOnValidatorChange(fn: () => void)
}

Selectors

[maxlength][formControlName]

[maxlength][formControl]

[maxlength][ngModel]

Class Description

A directive which installs the MaxLengthValidator for any formControlName,formControl, or control withngModelthat also has amaxlength` attribute.

Class Details

maxlength : string
ngOnChanges(changes: SimpleChanges)
validate(c: AbstractControl) : {[key: string]: any}
registerOnValidatorChange(fn: () => void)

exported from @angular/forms/index, defined in @angular/forms/src/directives/validators.ts

doc_Angular
2016-10-06 09:46:41
Comments
Leave a Comment

Please login to continue.