# angular.validator.url

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

## Description

Use phone validator to restrict the input URLs.

## Usage

### In HTML Template Binding

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

### In JavaScript

    angular.validator.url(value)

### Parameters

- `value – {string} –`

  value to validate

## Example

      Enter valid URL:
      <input name="text" value="http://example.com/abc.html" size="40" ng:validate="url" >

      it('should invalidate url', function(){
       var n1 = element('.doc-example-live :input');
       expect(n1.attr('className')).not().toMatch(/ng-validation-error/);
       input('text').enter('abc://server/path');
       expect(n1.attr('className')).toMatch(/ng-validation-error/);
      });