FluentValidation
Self-hosted open sourceA C# library that puts validation rules in a dedicated class, with rules that read like sentences (name must not be empty, at most 50 characters), kept separate from the data model.
Best forC# projects with many rules or cross-field checks.
Avoid whenYou only have a few simple "required, length" rules and the built-in attributes are enough.
Rules live in one validator class, so complex rules (cross-field dependencies, conditional checks) stay readable
Validator classes can be unit-tested on their own
Error messages are customizable and easy to return to the frontend
Requires an extra validator class, which feels verbose for simple endpoints
You must call it from the endpoint yourself, or install an integration package to hook it into the framework
The team has to learn one more way of writing validation