FluentValidation doesn’t need a project, a DI container, or an afternoon of scaffolding to prove itself.
It’s a FluentValidation library that lets you write validation rules as chainable method calls instead of stacking attributes on your model like Christmas ornaments. Define a validator class, chain some RuleFor calls, and you get readable, testable rules with custom error messages baked right in.
Jeremy Skinner built it back in 2009, years before “fluent” became a buzzword slapped on everything in .NET land. It’s still doing what DataAnnotations only wishes it could.
Meanwhile Microsoft’s [Required] attribute is still out there, doing its one trick, forever.
RuleFor(x => x.Topping).NotEmpty().WithMessage(”Pick a topping, don’t be shy.”);
RuleFor(x => x.Quantity).InclusiveBetween(1, 10).WithMessage(”Max 10 pizzas, this isn’t a warehouse.”); // <<< defines the actual validation rule chainTry it yourself (no setup required): https://dotnetfiddle.net/ZBYgL3


