Skip to content

Commit c292781

Browse files
committed
Search for an item to compare in context of form
1 parent bcff73a commit c292781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery.validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ $.extend($.validator, {
11521152
equalTo: function( value, element, param ) {
11531153
// bind to the blur event of the target in order to revalidate whenever the target field is updated
11541154
// TODO find a way to bind the event just once, avoiding the unbind-rebind overhead
1155-
var target = $(param);
1155+
var target = $(param, element.form);
11561156
if ( this.settings.onfocusout ) {
11571157
target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() {
11581158
$(element).valid();

0 commit comments

Comments
 (0)