title: Can't get MVC 4 FileExtensions Attribute to work on ViewModel property
body: <p>I need to upload a csv file and I want to restrict it's extension to .csv</p>
  
  <p>So I added the follow property to my ViewModel:</p>
  
  <pre><code>[FileExtensions(ErrorMessage = "Must choose .csv file.",Extensions = "csv,txt")]
  public HttpPostedFileBase File { get; set; }
  </code></pre>
  
  <p>In my view I have the following:</p>
  
  <pre><code>@Html.TextBoxFor(m =&gt; m.File, new { type = "file"})
  @Html.ValidationMessageFor(m =&gt; m.File)
  </code></pre>
  
  <p>However as soon as it hits my "ModelState.IsValid" check it returns invalid with my error message of "Must choose .csv file."</p>
  
  <p>I assume I'm just missing a parameter, but I haven't found a sample of this in use any where yet.</p>