jquery.unobtrusive.validate equalto fails with Compare Attribute - by BigDH01

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 665793 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 4/29/2011 8:44:53 AM
Access Restriction Public


Currently, an input with the compare attribute set will be decorated with a period to represent namespace.  This causes the equalto attribute to fail validation, at least in some cases.  Tested with jquery 1.5.1, jquery validate 1.8, and the jquery.validate.unobtrusive file that came with MVC3.  Fix is to alter:

element = $(options.form).find(":input[name=" + fullOtherName + "]")[0];


element = $(options.form).find(":input[name=" + fullOtherName.replace(".", "\\.") + "]")[0];

Also found at:
Sign in to post a comment.
Posted by Solar Matt on 10/1/2012 at 6:19 PM
When will this be released into the CDN hosted version? This is a significant pain.
Posted by BabaBooey08 on 9/1/2012 at 9:30 AM
Thank you so much Skip. I had this issue and was going to track it down eventually but came across this post, saved alot of time.

This will hit anyone who passes a Model that wraps multiple models to a view with validation on.

Worth fixing or at least making more prominent.
Posted by SkipIsHere on 12/2/2011 at 8:48 AM
Just came across this, we had to build on top of the suggested code

element = $(options.form).find(":input[name='" + fullOtherName.replace(".", "\\.") + "']")[0];

Would also be nice if "someone" at Microsoft could tell us where the latest (bug fixed) version resides, or do we have to wait til MVC4?
Posted by mikesimmons on 11/21/2011 at 8:33 AM
Hi Jean,

Glad you fixed it, can you tell me where this has been fixed? :)


Posted by Microsoft on 6/7/2011 at 10:27 AM
Thank you for taking the time to report this problem. We have fixed the problem in the code.

Jean-Sébastien Goupil
Posted by Giedrius Banaitis 2 on 6/6/2011 at 1:38 AM
Wondering if team is still reviewing this issue.
Posted by Microsoft on 5/5/2011 at 2:01 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by Microsoft on 4/29/2011 at 9:13 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)