MiniValidation icon indicating copy to clipboard operation
MiniValidation copied to clipboard

Question: Support for non-minimal apis with automatic validation

Open niemyjski opened this issue 2 years ago • 2 comments

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?

niemyjski avatar Aug 29 '23 02:08 niemyjski

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.

DamianEdwards avatar Aug 29 '23 04:08 DamianEdwards

@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.

niemyjski avatar Aug 29 '23 17:08 niemyjski