Angular-US-phone-validator

AngularJs module for formating US phone numbers

Homepage

Added by: Sam Deering

GitHub

Repository

anoop-pr/angular-us-phone-validator

Stats

Stars: 0

Watchers: 0

Forks: 2

Author

Anoop P R
Anoop P R

Module Description

Angular US phone number validation module


This is a simple Angular module for formatting US phone numbers as this format (xxx) xxx-xxxx.

  • Include the module file into index.html file.

<script src="us-phone.min.js"></script>

  • Ensure that your Application module specifies 'usPhone' as a dependency.

angular.module('mobileApp', ['usPhone']);

  • Use the directive 'us-phone-directive' in the html input element.

<input type="text" us-phone-directive class="form-control" name="phone" id="phone" ng-model="phone" placeholder="Phone number">

Click here for demo

Module stats last updated: 2015-04-28 11:07:48

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!