Skip to content

Commit

Permalink
Do nothing is match attribute is falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Sharp committed May 6, 2016
1 parent f91e245 commit 22c809d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-match",
"version": "1.8.0",
"version": "1.9.0",
"homepage": "https://github.com/TheSharpieOne/angular-validation-match",
"authors": [
"TheSharpieOne <evan@lostonia.com>"
Expand Down
4 changes: 2 additions & 2 deletions dist/angular-validation-match.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* angular-validation-match
* Checks if one input matches another
* @version v1.8.0
* @version v1.9.0
* @link https://github.com/TheSharpieOne/angular-validation-match
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
Expand All @@ -17,7 +17,7 @@ function match ($parse) {
require: '?ngModel',
restrict: 'A',
link: function(scope, elem, attrs, ctrl) {
if(!ctrl) {
if(!ctrl || !attrs.match) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-validation-match.min.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* angular-validation-match
* Checks if one input matches another
* @version v1.8.0
* @version v1.9.0
* @link https://github.com/TheSharpieOne/angular-validation-match
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(t,a,e){"use strict";function n(t){return{require:"?ngModel",restrict:"A",link:function(e,n,i,r){function c(){var t=o(e);return a.isObject(t)&&t.hasOwnProperty("$viewValue")&&(t=t.$viewValue),t}if(r){var o=t(i.match),u=t(i.matchCaseless),l=t(i.notMatch),s=t(i.matchIgnoreEmpty);e.$watch(c,function(){r.$$parseAndValidate()}),r.$validators.match=function(t,n){var i,r=t||n,o=c(),d=l(e);return s(e)&&!n?!0:(i=u(e)?a.lowercase(r)===a.lowercase(o):r===o,i^=d,!!i)}}}}}n.$inject=["$parse"],a.module("validation.match",[]),a.module("validation.match").directive("match",n)}(window,window.angular);
!function(t,a,e){"use strict";function n(t){return{require:"?ngModel",restrict:"A",link:function(e,n,i,r){function c(){var t=o(e);return a.isObject(t)&&t.hasOwnProperty("$viewValue")&&(t=t.$viewValue),t}if(r&&i.match){var o=t(i.match),u=t(i.matchCaseless),l=t(i.notMatch),s=t(i.matchIgnoreEmpty);e.$watch(c,function(){r.$$parseAndValidate()}),r.$validators.match=function(t,n){var i,r=t||n,o=c(),d=l(e);return s(e)&&!n?!0:(i=u(e)?a.lowercase(r)===a.lowercase(o):r===o,i^=d,!!i)}}}}}n.$inject=["$parse"],a.module("validation.match",[]),a.module("validation.match").directive("match",n)}(window,window.angular);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-validation-match",
"version": "1.8.0",
"version": "1.9.0",
"homepage": "https://github.com/TheSharpieOne/angular-validation-match",
"description": "Checks if one input matches another",
"main": "./index.js",
Expand Down

0 comments on commit 22c809d

Please sign in to comment.