GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • NG_VALIDATORS
  • Form Validation

This view

  • Original page
  • New address

GeezerVison is showing angular.dev — EmailValidator • Angular

API

    
      class EmailValidator extends AbstractValidatorDirective {}
    
    

Tracks changes to the email attribute bound to this directive.

Description

A directive that adds the email validator to controls marked with the email attribute. The directive is provided with the NG_VALIDATORS multi-provider list.

The email validation is based on the WHATWG HTML specification with some enhancements to incorporate more RFC rules. More information can be found on the Validators.email page.

Exported by

  • FormsModule
  • ReactiveFormsModule

Usage Notes

Adding an email validator

The following example shows how to add an email validator to an input attached to an ngModel binding.

<input type="email" name="email" ngModel email>
<input type="email" name="email" ngModel email="true">
<input type="email" name="email" ngModel [email]="true">
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.