EmailValidator

EmailValidator

Experimental Directive

Class Overview

class EmailValidator implements Validator {
  email 
  validate(c: AbstractControl) : ValidationErrors|
}

Selectors

[email][formControlName]

[email][formControl]

[email][ngModel]

Class Description

A Directive that adds the email validator to controls marked with the email attribute, via the NG_VALIDATORS binding.

Example

<input type="email" name="email" ngModel email>
<input type="email" name="email" ngModel email="true">
<input type="email" name="email" ngModel [email]="true">

Class Details

email
validate(c: AbstractControl) : ValidationErrors|

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

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部