title: ExpressiveAnnotations RequiredIf Client Side Validation
body: <p>Installed EA for trying to have a parameter be required if there is nothing in the database, IE. this is the first time someone is creating something. </p>
  
  <p>However, the RequiredIf never fires for client side validation, even though when the model gets into the partial view, the BindingExists bool is set to false and the Xml value is still null. </p>
  
  <p>Model: </p>
  
  <pre><code>    public class AddTestStepXmlParameterModel
      {
  
          public ParameterTypeEnum ParameterType { get; set; }
  
          public string ParameterName { get; set; }
  
          public string Description { get; set; }
  
  
          [RequiredIf("BindingExists == false", ErrorMessage = "An XML File is required: Please Try again")]
          [FileExtensions(Extensions = "xml", ErrorMessage = "Specify an XML file.")]
          public HttpPostedFileBase XmlValue { get; set; }
  
          public bool BindingExists { get; set; }
  
      }
  </code></pre>
  
  <p>Global.asax:</p>
  
  <pre><code>protected void Application_Start()
  {                                                                                    
      ModelValidatorProviders.Providers.Remove(ModelValidatorProviders.Providers.FirstOrDefault(x =&gt; x is DataAnnotationsModelValidatorProvider));
      ModelValidatorProviders.Providers.Add(new ExpressiveAnnotationsModelValidatorProvider());
  }
  </code></pre>
  
  <p>Scripts in View: </p>
  
  <pre><code>&lt;script src="~/Scripts/jquery-3.1.0.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery.validate.unobtrusive.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/expressive.annotations.validate.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Partial View Call:</p>
  
  <pre><code> @Html.Partial("AddParameters", Model.AddTestStepModel.AddTestStepParametersModel)
  </code></pre>
  
  <p>Partial View:</p>
  
  <pre><code>@Html.HiddenFor(m =&gt; m.AddTestStepXmlParameterModels[k].BindingExists, new {@Value = Model.AddTestStepXmlParameterModels[k].BindingExists})
  @Html.TextBoxFor(m =&gt; m.AddTestStepXmlParameterModels[k].XmlValue, new {type = "file", @class = "btn btn-default btn-file", style = "color:transparent", onchange = "this.style.color = 'black'"})
  @Html.ValidationMessageFor(m =&gt; m.AddTestStepXmlParameterModels[k].XmlValue)
  </code></pre>
  
  <p>When using just a normal "Required", the Xml Value client side fires off fine, however using the RequiredIf fails to do any validation. I've followed the isntallation steps with the Global.asax</p>