Skip to content

Commit

Permalink
Removed "isObservable" check from 'params' and checks from 'severity'…
Browse files Browse the repository at this point in the history
… instead.
  • Loading branch information
Hekku2 committed Nov 3, 2016
1 parent a7fa4e5 commit 07ae2ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/knockout.validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ kv.configuration = configuration;
// }
// )};
//
if (params && !ko.isObservable(params) && (params.message || params.onlyIf || params.severity)) { //if it has a message, condition, or severity object, then its an object literal to use
if (params && (params.message || params.onlyIf || (params.severity && !ko.isObservable(params.severity)))) { //if it has a message, condition, or severity object, then its an object literal to use
return kv.addRule(observable, {
rule: ruleName,
message: params.message,
Expand Down
2 changes: 1 addition & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
// }
// )};
//
if (params && !ko.isObservable(params) && (params.message || params.onlyIf || params.severity)) { //if it has a message, condition, or severity object, then its an object literal to use
if (params && (params.message || params.onlyIf || (params.severity && !ko.isObservable(params.severity)))) { //if it has a message, condition, or severity object, then its an object literal to use
return ko.validation.addRule(observable, {
rule: ruleName,
message: params.message,
Expand Down

0 comments on commit 07ae2ef

Please sign in to comment.