From 0ffdbfd81159cc901509486637f2e4342c97589e Mon Sep 17 00:00:00 2001 From: bramstroker Date: Fri, 1 Mar 2013 09:58:33 +0100 Subject: [PATCH] Altered equalTo selector --- jquery.validate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();