DamianEdwards / MiniValidation

A minimalist validation library for .NET built atop the existing features in `System.ComponentModel.DataAnnotations` namespace
MIT License
337 stars 27 forks source link

Feature Request / Question: Validate whole of nested object #25

Closed 78Codes closed 1 year ago

78Codes commented 2 years ago

Hi Damian, a question about the road map for MiniValidaton. Do you plan to make it possible to configure MiniValidation to return all the validation errors for a nested object rather than stopping at the first object in error? Specifically this would be overriding the behaviour of isValid in MiniValidator so that it continues to walk through all nested objects after the first error is encountered.

DamianEdwards commented 2 years ago

That's the first request I've had for that behavior 😃 As far as I can tell, the behavior you're asking for is similar to what ASP.NET Core MVC does by default, so seems totally reasonable to mimic that.

DamianEdwards commented 1 year ago

Fixed in 042f655f7cf2c1a4c0de9bc4505abd13e6c2cb04

zprobinson commented 1 year ago

It's been a hot minute since I've played around! I appreciate the addition Damian!

Mini validation has been working fantastic in my project so far, this will be an awesome update for it when I get back to upgrading it. :)