Skip to content

wertzui/restworld

v1.0.0Unlicense

Skills for building REST APIs and clients with the RESTworld library (ASP.NET Core, EF Core, HAL, OData, Angular).

restworld-validation

Add custom validation to a RESTworld CRUD endpoint. Use when asked to validate DTOs before or after create/update, reject a request with a 400 validation error, add business-rule checks (uniqueness, limits, immutable fields, cross-field rules), write a validator class, derive from ValidatorBase, CreateValidatorBase or UpdateValidatorBase, return ValidationResults / IValidationResults, register a validator with AddValidator, AddCreateValidator or AddUpdateValidator, understand AddValidationAndErrorHandling, ValidationService or the problem details / errors dictionary returned to the client, or validate collections (ValidateCollectionBeforeCreateAsync etc.).

Read SKILL.md at the source

Pinned to revision 16a16527ce81, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.