Cookbook
Task-oriented recipes for common application scenarios. Each recipe is self-contained and links to the deeper guide for the underlying concept.
Recipes
- Validate a minimal API request
- Validate an MVC controller
- Validate a MediatR command
- Validate a Blazor form
- Rule sets and partial updates
- Custom rules with shared context
- Localized validation messages
- Test validators
- Emit JSON Schema, OpenAPI, and client rules
- Validate a desktop view model
Conventions
- Examples target .NET 10 (LTS) and the preview package
1.0.0-preview.2; the .NET 11 bridge and OpenAPI packages addnet11.0assets. - Register validators as
IValidator<T>(scoped or singleton). - Use the async path when the validator has async rules.