Skip to content

beckyconning/ng-pattern-restrict

 
 

Repository files navigation

ng-pattern-restrict Build Status

Allowing certain inputs based on a regex pattern, preventing the user from inputting anything invalid.

Usage

<input type="text" pattern="[0-9]+" ng-pattern-restrict />

Should be the same as

<input type="text" ng-pattern-restrict="[0-9]+" pattern="[0-9]+" />

Unit testing

In order to unit test you need to execute the following steps:

node karma-server.js

Leave that running on the background, it will open up an HTTP server at port 8000.

grunt karma

About

Allowing only certain inputs based on a regex pattern, for AngularJS

Resources

License

Stars

Watchers

Forks

Packages

No packages published