While using ASP.NET MVC with unobtrusive validation enabled I have, on a number of occasions, had a need to embed an ID into a Razor form as a hidden field. I've learned to always include a validation message, for example:

```
@Html.HiddenFor(x => x.ParentId)
@Html.ValidationMessageFor(x => x.ParentId)

```

If the validation message is left off, this will trigger a javascript error on submit, because the hidden field by default includes unobtrusive validation attributes which require a corresponding validation error message. 
I realize that I can get the html output that I'm looking for by hand-coding the field:

```
<input data-val="false" id="ParentId" name="ParentId" type="hidden" value="@Model.ParentId" />

```

But if I take this approach I lose the benefits of using the `InputExtensions.HiddenFor` helper method. Is there any way I can simply use the extension method without generating JavaScript errors? 

**Edit:**

This was a jquery validate issue. My jquery validate script was stuck on version 1.8.1 (see note below). I manually updated to jquery.validate 1.11.1 and the problem disappeared.

*Note*:

The reason the jQuery validate wasn't updating is because the original jquery validate 1.8.1 scripts were not installed by NuGet. In this scenario, NuGet detects the library and offers to update, but when the update is executed the original scripts are not replaced. This is treated as a non-fatal warning by NuGet. Moral of the story: read all of your NuGet output!