csharp-validation
CommunityEnsure robust C# input validation across layers
Software Engineering#csharp#validation#input-validation#aspnet-core#fluentvalidation#model-binding#dataannotations
AuthorCloudyWing
Version1.0.0
Installs0
System Documentation
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.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: csharp-validation Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#csharp-validation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.