title: Validating Uploaded Files Using IValidatableObject
body: <p><br/>
  Hi All! 
  <br/><br/>
  I'm a bit of a noob at model validation and i've been trying to validate an Articles object and an uploaded file using the IValidatableObject interface with no success.
  <br/><br/>
  This following class validates the Articles object just fine but I can't see how the HttpPostedFileBase is injected to allow me to validate against it. Is this even possible to achieve using this method?
  <br/><br/>
  The form i'm using to submit the data includes the enctype = multipart/form-data attribute so it knows its posting files.
  <br/><br/>
  This is the full class im trying to validate. This ones really got me stuck and any help will be very gratefully appreciated.
  <br/><br/></p>
  
  <pre><code>public class ArticlesModel : IValidatableObject
  {
      public Article Article { get; set; }
      public IEnumerable&lt;Category&gt; Categories { get; set; }
      public HttpPostedFileBase PostedFile { get; set; }
  
      public ArticlesModel(){}
  
      public ArticlesModel(Article article, IEnumerable&lt;Category&gt; categories)
      {
          this.Article = article;
          this.Categories = categories;
      }
  
      public IEnumerable&lt;ValidationResult&gt; Validate(ValidationContext validationContext)
      {
          if (Article.CategoryID == 0)
          {
              yield return new ValidationResult("Please select a category.", new[] { "Article.Category"});
          }
  
          if (Article.Title == null)
          {
              yield return new ValidationResult("Please enter a title.", new[] { "Article.Title" });
          }
  
          if (Article.Content == null)
          {
              yield return new ValidationResult("Please enter some content.", new[] { "Article.Content" });
          }
  
  
          if (PostedFile == null)
          {
              yield return new ValidationResult("Please upload a file.", new[] { "Article.ImageFile" });
          }
          else
          {
              if (PostedFile.ContentLength &gt; 1 * 1024 * 1024)
              {
                  yield return new ValidationResult("Please upload a file 1Mb or less.", new[] { "Article.ImageFile" });
              }
  
              //Other file checking logic here please!!
          }
      }
  }
  </code></pre>