Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Src/knockout.validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,13 @@
// }
// )};
//
if (params.message || params.onlyIf) { //if it has a message or condition object, then its an object literal to use
if (params.message || params.onlyIf || params.constraintGroupId) { //if it has a message or condition object, then its an object literal to use
return exports.addRule(observable, {
rule: ruleName,
message: params.message,
params: utils.isEmptyVal(params.params) ? true : params.params,
condition: params.onlyIf
condition: params.onlyIf,
constraintGroupId: params.constraintGroupId
});
} else {
return exports.addRule(observable, {
Expand Down