.Net6 WebApi中集成FluentValidation.AspNetCore的用法
一、首先在nuget管理器中添加FluentValidation.AspNetCore包

二、添加验证类并继承AbstractValidator<T>,T为原始参数类,在验证类的构造函数中添加验证内容

三、在program.cs文件中注册

一、首先在nuget管理器中添加FluentValidation.AspNetCore包

二、添加验证类并继承AbstractValidator<T>,T为原始参数类,在验证类的构造函数中添加验证内容

三、在program.cs文件中注册
