Permalink
Browse files

Merge pull request #573 from zeroasterisk/dev

Dev: validator with single quotes for bracketed selectors
  • Loading branch information...
2 parents 46b8662 + de40eed commit 6dbd3ec5d38ca901440e4cbe634283d8caf5d0d8 @duclet duclet committed Jan 19, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/validator/validator.js
View
6 src/validator/validator.js
@@ -261,7 +261,7 @@
v.fn(":radio", "Please select an option.", function(el) {
var checked = false;
- var els = $("[name=" + el.attr("name") + "]").each(function(i, el) {
+ var els = $("[name='" + el.attr("name") + "']").each(function(i, el) {
if ($(el).is(":checked")) {
checked = true;
}
@@ -578,7 +578,7 @@
// get radio groups by name
inputs.filter(":radio[required]").bind("change.V", function(e) {
- var els = $("[name=" + $(e.srcElement).attr("name") + "]");
+ var els = $("[name='" + $(e.srcElement).attr("name") + "']");
if ((els != null) && (els.length != 0)) {
self.checkValidity(els, e);
}
@@ -621,4 +621,4 @@
};
-})(jQuery);
+})(jQuery);

0 comments on commit 6dbd3ec

Please sign in to comment.