I\'m using MVC3 with Razor.
I\'ve included the following in my _Layout.cshtml:
Try adding the following lines to your view.
HtmlHelper.ClientValidationEnabled = true;
HtmlHelper.UnobtrusiveJavaScriptEnabled = true;
Along with including jquery-1.4.4.js, jquery.validate.js, jquery.validate.unobtrusive.js
I get it to work for my app but it seems not to kick in until I put in a bad value. For example
[Required(ErrorMessageResourceType = typeof(Resources.WValidation), ErrorMessageResourceName = "TestCountRequired")]
[Range(1, Int32.MaxValue, ErrorMessageResourceType = typeof(Resources.WValidation), ErrorMessageResourceName = "TestCountRange")]
public int? TestCountThreshold { get; set; }
then i put in a 0 on the front-end and after that client side validation works flawlessly. I would like for validation to work for initial blank text boxes... It seems incorrect for the validation to wait until there is an attempted bad value.