# angular.validator.email

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

## Description

Use email validator if you wist to restrict the user input to a valid email.

## Usage

### In HTML Template Binding

    <input type="text" ng:validate="email"/>

### In JavaScript

    angular.validator.email(value)

### Parameters

- `value – {string} –`

  value to validate

## Example

      Enter valid email:
      <input name="text" ng:validate="email" value="me@example.com">

      it('should invalidate email', function(){
       var n1 = element('.doc-example-live :input');
       expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
       input('text').enter('a@b.c');
       expect(n1.attr('className')).toMatch(/ng-validation-error/);
      });