AngularJS module for validating