MaxLengthValidator

MaxLengthValidator

Stable Directive

Class Overview

class MaxLengthValidator implements Validator, 
  maxlength : string
  ngOnChanges(changes: SimpleChanges) : void
  validate(c: AbstractControl) : {[key: string]: any}
  registerOnValidatorChange(fn: () => void) : 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) : void
validate(c: AbstractControl) : {[key: string]: any}
registerOnValidatorChange(fn: () => void) : void

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

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/forms/index/MaxLengthValidator-directive.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部