DamianEdwards / MiniValidation

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

Question: Support for non-minimal apis with automatic validation #51

Open niemyjski opened 10 months ago

niemyjski commented 10 months ago

This project talks about MinimalApi.Extensions but what about all existing projects that are not using minimal apis? Are there any plans to support this via ObjectModelValidator, IBindingMetadataProvider, IModelValidatorProvider, ValidationVisitor implementations?

DamianEdwards commented 10 months ago

MVC already supports validation using System.ComponentModel.DataAnnotations out of the box. In fact, the behavior of this library is for many parts modelled on the behavior of the MVC validation implementation. This library is intended for use in places where there isn't already support for validation and a simple, higher-level API than System.ComponentModel.DataAnnotations.Validator with some commonly desired features (e.g. recursive validation) is attractive.

niemyjski commented 10 months ago

@DamianEdwards I get that, it's just nice to know that the same validation process is occurring across the app and async validation is also supported. I just referenced a commit which enabled this behavior for us.