What advantage does the FluentValidation library have over the .NET System.ComponentModel.DataAnnotations?
Does it offer more flexible validation as it is not annotated (static field validation) on the property like validating a property depending on another’s property value?
I’m not sure about data annotations but we’ve used FluentValidation for validation part in business logic. And easy integrating with ASP.NET MVC is nice bonus 🙂
It supports a lot of built-in rules, error messages localization, using object data in error messages, custom validation methods, conditional validation – applying some rules if object data matches a condition, rule sets – apply named set of rules, validation of aggregated objects and collections – and property names would be compatible with ASP.NET MVC property names and so on.