Override ValidationResult.IsValid

Apr 6, 2012 at 6:17 PM

Hi Jeremy,

Similar to this post, we add validation failures that have varying degrees of importance specified in CustomState: Critical, Warning, Informational

http://fluentvalidation.codeplex.com/discussions/68070

Would you be willing to make ValidationResult.IsValid abstract so that we can change it to something like this:

public class OurValidationResult : ValidationResult {

    public overrides bool IsValid {

        get {return Errors.Count(e=>e.CustomState != Informational); }

    }
}

Thanks so much!

Thad

Coordinator
Apr 7, 2012 at 5:53 PM

Hi Thad

I've just committed a change that makes this virtual. Feel free to build from source and give it a go.

Jeremy