Skip to content

Commit

Permalink
Core: Use plain element instead of un-wrapping the element again
Browse files Browse the repository at this point in the history
Closes #1060
  • Loading branch information
staabm authored and jzaefferer committed Mar 31, 2014
1 parent 5c3e46a commit 03cd4c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -883,14 +883,14 @@ $.extend($.validator, {
attributeRules: function( element ) {
var rules = {},
$element = $(element),
type = $element[0].getAttribute("type"),
type = element.getAttribute("type"),
method, value;

for (method in $.validator.methods) {

// support for <input required> in both html5 and older browsers
if ( method === "required" ) {
value = $element.get(0).getAttribute(method);
value = element.getAttribute(method);
// Some browsers return an empty string for the required attribute
// and non-HTML5 browsers might have required="" markup
if ( value === "" ) {
Expand Down

0 comments on commit 03cd4c9

Please sign in to comment.