Skip to content

Commit 22c809d

Browse files
author
Evan Sharp
committed
Do nothing is match attribute is falsy
1 parent f91e245 commit 22c809d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-match",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"homepage": "https://github.com/TheSharpieOne/angular-validation-match",
55
"authors": [
66
"TheSharpieOne <[email protected]>"

dist/angular-validation-match.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* angular-validation-match
33
* Checks if one input matches another
4-
* @version v1.8.0
4+
* @version v1.9.0
55
* @link https://github.com/TheSharpieOne/angular-validation-match
66
* @license MIT License, http://www.opensource.org/licenses/MIT
77
*/
@@ -17,7 +17,7 @@ function match ($parse) {
1717
require: '?ngModel',
1818
restrict: 'A',
1919
link: function(scope, elem, attrs, ctrl) {
20-
if(!ctrl) {
20+
if(!ctrl || !attrs.match) {
2121
return;
2222
}
2323

dist/angular-validation-match.min.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*!
22
* angular-validation-match
33
* Checks if one input matches another
4-
* @version v1.8.0
4+
* @version v1.9.0
55
* @link https://github.com/TheSharpieOne/angular-validation-match
66
* @license MIT License, http://www.opensource.org/licenses/MIT
77
*/
8-
!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);
8+
!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);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-validation-match",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"homepage": "https://github.com/TheSharpieOne/angular-validation-match",
55
"description": "Checks if one input matches another",
66
"main": "./index.js",

0 commit comments

Comments
 (0)