title: ASP.NET MVC: Image upload validation
body: <p>I'm trying to subclass <code>ValidationAttribute</code> in ASP.NET MVC 2 to make something along the lines of an <code>ImageValidator</code> class which would make sure that an uploaded image (from <code>&lt;input type="file"&gt;</code>) has the correct mimetype, doesn't exceed the maximum allowed file size, etc.</p>
  
  <p>So where do I start? I get the feeling like images are an exception when it comes to ASP.NET MVC validation attributes and that you always have to manually figure out ways to validate them. For example, what type should the property in my model/view model have?</p>