mirror of
https://github.com/jquery-validation/jquery-validation.git
synced 2025-12-20 09:11:40 +01:00
Core: prevent unnecessary $() rewrapping, re-use local var instead
This commit is contained in:
@@ -555,7 +555,7 @@ $.extend($.validator, {
|
|||||||
if ( type === "radio" || type === "checkbox" ) {
|
if ( type === "radio" || type === "checkbox" ) {
|
||||||
return $("input[name='" + element.name + "']:checked").val();
|
return $("input[name='" + element.name + "']:checked").val();
|
||||||
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
|
} else if ( type === "number" && typeof element.validity !== "undefined" ) {
|
||||||
return element.validity.badInput ? false : $(element).val();
|
return element.validity.badInput ? false : $element.val();
|
||||||
}
|
}
|
||||||
|
|
||||||
val = $element.val();
|
val = $element.val();
|
||||||
|
|||||||
Reference in New Issue
Block a user