EmailValidator

directive

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

NgModules

Selectors

Properties

Property Description
@Input()email: boolean | string Write-only.

Description

Example

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

Methods

validate(control: AbstractControl): ValidationErrors | null

Parameters

control

Type: AbstractControl.

Returns

ValidationErrors | null

registerOnValidatorChange(fn: () => void): void

Parameters

fn

Type: () => void.

Returns

void

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v6.angular.io/api/forms/EmailValidator