title: The custom client-side validation(attribute) doesn't trigger in MVC 4
body: <p>I write a code for validate the incoming data. </p>
  
  <p>All of the <strong>built-in validation</strong> (RequiredAttribute etc) are <strong>works</strong>...</p>
  
  <p><strong>But my own</strong> writed DateRangeAttribute <strong>doesnt triggers errors on post</strong>, and the post is comes to my controller :(. </p>
  
  <p>The <strong>overrided IsValid</strong> method sends back the <strong>good(false)</strong>  value, and on the server side the controller see correctly the Invalid ModelState, but the client side not.</p>
  
  <p><em>The data validation attributes are rendered to HTML on the browser:</em> </p>
  
  <p><strong>I would like the avoid the post until all of the data are realy valid.</strong></p>
  
  <h1>There is the Code:</h1>
  
  <p><strong>DateRangeAttribute</strong> </p>
  
  <pre><code>public class DateRangeAttribute : RangeAttribute
      {
          public DateRangeAttribute (string minimumYear) 
              :base(typeof(DateTime), minimumYear, DateTime.Now.Year.ToString())
          {
          }
  
          protected override ValidationResult IsValid(object value, ValidationContext validationContext)
          {
              var inputYear = value as int?;
              var result = (inputYear != null &amp;&amp; inputYear &gt;= 1886 &amp;&amp; inputYear &lt;= DateTime.Now.Year);
  
              return result ? ValidationResult.Success : new ValidationResult(GetErrorMessage());
          }
  
          private string GetErrorMessage()
          {
              return "The year must be greater than 1886 and lower than the actual year.";
          }
  
          public override string FormatErrorMessage(string name)
          {
              return string.Format(GetErrorMessage(), name);
          }
      }
  </code></pre>
  
  <p><strong>Create.cshtml</strong></p>
  
  <pre><code>&lt;script src="@Url.Content("~/Scripts/jquery-1.8.2.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;!-- ... --&gt;
  
  @using (Html.BeginForm("Create", "Car", FormMethod.Post, new { id = "CreateForm" }))
  { 
      @Html.ValidationSummary(true)
      &lt;!-- ... --&gt;
          @Html.LabelFor(model =&gt; model.Year)
          @Html.EditorFor(model =&gt; model.Year)
          @Html.ValidationMessageFor(model =&gt; model.Year)
      &lt;!-- ... --&gt;
  }
  
  Web.Config file:
  &lt;configuration&gt;
      &lt;appSettings&gt;
          &lt;!-- ... --&gt;
          &lt;add key="ClientValidationEnabled" value="true" /&gt;
          &lt;add key="UnobtrusiveJavaScriptEnabled" value="true" /&gt;
      &lt;/appSettings&gt;
      &lt;!-- ... --&gt;
  &lt;/configuration&gt;
  </code></pre>