What problem does it solve?
This skill provides clear, production-oriented guidance to eliminate inconsistent or misplaced input validation in C# applications by defining distinct responsibilities for format validation, business-rule checks, and domain invariants and by prescribing framework-specific integration patterns.
Core Features & Use Cases
- Layered validation guidance: Clarifies which checks belong to model binding, service layer, and domain model to avoid duplication and maintainability issues.
- Framework selection rules: When to use DataAnnotations versus FluentValidation and the rule to avoid mixing them for the same validation layer.
- Integration patterns: Advice for MVC automatic ModelState handling, Minimal API endpoint filters, FluentValidation registration, and error message conventions (Traditional Chinese).
- Defensive validation principles: Best practices for validation at system boundaries, constructor guards for domain invariants, and avoiding over-defensive repeated checks.
- Use case: Code review or implementation of API request models, selecting validators, and ensuring consistent error messages and integration across an ASP.NET Core project.
Quick Start
Ask the skill to review a request model and return recommended DataAnnotations or a FluentValidation validator with Traditional Chinese error messages and integration notes for ASP.NET Core.