This package has been discontinued because it never evolved, and the code present in this package does not justify its continuation. It is preferable to implement this code directly in the project if necessary.
Add middleware in AspNetCore pipeline to standardize validation responses
- .NET 7.0
- .NET 6.0
- .NET 5.0
- Microsoft.AspNetCore.Mvc NuGet
- PowerUtils.AspNetCore.ErrorHandler NuGet
- PowerUtils.Validations NuGet
This package is available through Nuget Packages: https://www.nuget.org/packages/PowerUtils.AspNetCore.ErrorHandler.Validations
Nuget
Install-Package PowerUtils.AspNetCore.ErrorHandler.Validations
.NET CLI
dotnet add package PowerUtils.AspNetCore.ErrorHandler.Validations
You need to add services.AddErrorHandler();
for services.AddValidationNotifications();
to work
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
...
services.AddValidationNotifications();
services.AddErrorHandler();
...
}
public void Configure(IApplicationBuilder app)
{
app.UseErrorHandler();
...
}
}
If you have any questions, comments, or suggestions, please open an issue or create a pull request