Skip to content

Commit

Permalink
fixed syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
xarnze committed Oct 11, 2013
1 parent f2b8220 commit cd35315
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jqBootstrapValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1158,14 +1158,14 @@
var type = $this.attr("type");
if (type === "checkbox") {
value = ($this.is(":checked") ? value : "");
var checkboxParent = $this.parents("form").first() || $this.parents(settings.options.classNames.group).first();
var checkboxParent = $this.parents("form").first() || $this.parents(defaults.options.classNames.group).first();
if (checkboxParent) {
value = checkboxParent.find("input[name='" + $this.attr("name") + "']:checked").map(function (i, el) { return $(el).val(); }).toArray().join(",");
}
}
else if (type === "radio") {
value = ($('input[name="' + $this.attr("name") + '"]:checked').length > 0 ? $this.val() : "");
var radioParent = $this.parents("form").first() || $this.parents(settings.options.classNames.group).first();
var radioParent = $this.parents("form").first() || $this.parents(defaults.options.classNames.group).first();
if (radioParent) {
value = radioParent.find("input[name='" + $this.attr("name") + "']:checked").map(function (i, el) { return $(el).val(); }).toArray().join(",");
}
Expand Down

0 comments on commit cd35315

Please sign in to comment.