How to validate file type of HttpPostedFileBase attribute in Asp.Net MVC 4?
Because your attribute inherits from and existing attribute, it would need to be registered in global.asax (refer this answer for an example), however do not do that in your case. Your validation code does not work, and a file type attribute should not be inheriting from RequiredAttribute – it needs to inherit from ValidationAttribute and … Read more