Custom validation attribute not working with MVC 6
<p><strong>EDIT :</strong> There was a issue on github for this problem, <strong>it's solved</strong>. It's working now.</p>

<p>I want to implement a custom validation attribute to check file properties.</p>

<p>I made this :</p>

<pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class CustomFileCheckAttribute : ValidationAttribute
{
    protected override ValidationResult IsValid(object value, ValidationContext validationContext)
    {
        if (value == null)
            return new ValidationResult("error message");

        IFormFile file = value as IFormFile;
        if (file == null)
            return new ValidationResult("error message");

        if (file.Length &lt; MyCustomFileConstants.FileMinLength)
            return new ValidationResult("error message");

        if (file.Length &gt; MyCustomFileConstants.FileMaxLength)
            return new ValidationResult("error message");

        if (file.ContentType != MyCustomFileConstants.FileAuthorizedContentType)
            return new ValidationResult("error message");

        file = null;
        return ValidationResult.Success;
    }
}
</code></pre>

<p>And in my view model I have this :</p>

<pre><code>public class MyViewModel
{
    [DataType(DataType.Upload)]
    [CustomFileCheck]
    public IFormFile FileToHandle { get; set; }

    public MyViewModel()
    { }
}
</code></pre>

<p>When I pick no file, my attribute is used but if I pick a file, my attribute isn't executed and ModelState is always valid.</p>

<p>Any idea what's going on ?</p>