FluentValidationGuard NuGet Package

Validate you input!

public static void Example(string name, int age)
{
try
{
Validator
.Begin(name, nameof(name))
.NotNull()
.NotWhiteSpace()
.Map(age, nameof(age))
.IsGreaterOrEquals(18)
.TrowIfHasErrors(nameof(ErrorConverter), nameof(Example));
}
catch (ValidationException e)
{
Console.WriteLine(e);
IErrorConverter converter = new ErrorConverter();
var errors = converter.Convert(e);
Console.WriteLine(errors);
}
}.




Got any FluentValidationGuard Question?





Info

Version: 1.6.0
Author(s): FluentValidationGuard
Last Update: Friday, March 27, 2020
.NET Fiddle: Create the first Fiddle
NuGet Url: https://www.nuget.org/packages/FluentValidationGuard


Install
Install-Package FluentValidationGuard
dotnet add package FluentValidationGuard
paket add FluentValidationGuard
FluentValidationGuard Download (Unzip the "nupkg" after downloading)



Tags



STATS

must-have-score

avg-downloads-per-day

1

days-since-last-release

1694