angular-xregexp
v1.0.0
Published
angular-xregexp ==============
Downloads
858
Readme
angular-xregexp
XRegExp validator for AngularJS. This library decorates ngPattern to use XRegExp for more complex regular expression.
Installation
You can choose your preferred method of installation:
- Through bower:
bower install angular-xregexp --save
- Through npm:
npm install angular-xregexp xregexp --save
- Download from github: angular-xregexp.min.js
Usage
Include both xregexp-all.js and angular-xregexp.js in your application.
<script src="components/xregexp/xegexp-all.js"></script>
<script src="components/angular-xregexp/angular-xregexp.js"></script>
Add the module angularXRegExp
as a dependency to your app module:
var myapp = angular.module('myapp', ['angularXRegExp']);
Then just use ng-pattern
as always.
License
Released under the terms of the MIT License.