diff --git a/jquery.validate.js b/jquery.validate.js index e6d5f311a..707066dcc 100644 --- a/jquery.validate.js +++ b/jquery.validate.js @@ -1152,7 +1152,7 @@ $.extend($.validator, { equalTo: function( value, element, param ) { // bind to the blur event of the target in order to revalidate whenever the target field is updated // TODO find a way to bind the event just once, avoiding the unbind-rebind overhead - var target = $(param); + var target = $(element).closest('form').find(param); if ( this.settings.onfocusout ) { target.unbind(".validate-equalTo").bind("blur.validate-equalTo", function() { $(element).valid();
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: