Validation framework
CSF.Validation is a framework for validating domain objects. Its goal is to provide an extensible architecture for writing, executing and consuming the results of validation logic.
The documentation home page links to tutorials, examples & guidance for writing validators. The source code is hosted on a GitHub project site. Please visit to contribute issue reports, changes, discussion or to see the project status.
Compatibility
The CSF.Validation NuGet packages are multi-targeted for a wide-range of supported .NET versions. This table shows the .NET support.
Runtime | Versions |
---|---|
.NET Framework | 4.6.1 and up |
.NET Core | 2.0 and up |
.NET | 5.0 and up |
NuGet packages
The validation framework is distributed across a number of packages available via NuGet. This table summarises each of them and their purpose.
Package | Description |
---|---|
CSF.Validation.Abstractions | Models & interfaces required to consume validation from your application's logic using dependency injection. Has minimal/no dependencies of its own (depending upon target framework). |
CSF.Validation | The core logic of the validation framework. Only needs to be referenced by an application's startup project to configure dependency injection. |
CSF.Validation.StandardRules | Pre-written validation rules & messages. Also a service to validate a validation manifest. Has minimal dependencies of its own. |
CSF.Validation.Json | A serializer service for reading/writing manifest models to/from JSON, demonstrating validation as data. |
CSF.Validation.Selfhosting | A library enabling use of the validation framework by apps which do not use dependency injection. |