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

CSS

ng-validation-error

Example

Enter valid email: <input name="text" ng:validate="email" value="me@example.com"> it('should invalidate email', function(){ var n1 = element('.doc-example :input'); expect(n1.attr('className')).not().toMatch(/ng-validation-error/); input('text').enter('a@b.c'); expect(n1.attr('className')).toMatch(/ng-validation-error/); });