I can't seem to get client-side validation to work in an asp.net mvc3 application. In the config I have
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
In my _Layout.cshtml I have
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
In my page I have
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
I am just playing around using mvc 3 with ef 4 and my model class just has a field with that is required but client-side validation is not triggering. It's always posting back. Any ideas?