dotnet-input-validation

Validate HTTP request inputs for .NET APIs with endpoint filters.

Updated Aug 16, 2025
One-click install
npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-input-validation-dodyg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-input-validation
Source: https://github.com/dodyg/blue-nile-pds/tree/main/.agents/skills/dotnet-input-validation
Command: npx skills add https://github.com/dodyg/blue-nile-pds --skill dotnet-input-validation-dodyg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need reliable, consistent validation of HTTP request data across .NET 10 Minimal APIs, MVC controllers, and various validation libraries, while avoiding security pitfalls such as ReDoS and improper error handling.

Core Features & Use Cases

  • Built‑in .NET 10 validation with AddValidation and source‑generated validators.
  • FluentValidation integration using manual endpoint filters for complex business rules.
  • Data Annotations support with custom attributes and IValidatableObject.
  • Endpoint filters that return RFC‑9457 ProblemDetails responses for failed validation.
  • Security‑focused checks including regex timeouts, allow‑list file uploads, and request size limits.

Quick Start

Use the dotnet-input-validation skill to validate a sample CreateProductRequest DTO and receive a validation summary.

Frequently Asked Questions about dotnet-input-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate HTTP request inputs in .NET Minimal APIs?

To validate HTTP request inputs in .NET Minimal APIs, you can use endpoint filters that automatically check DTOs and return RFC-9457 ProblemDetails responses for invalid data. This skill supports .NET 10 built-in validation, FluentValidation, and Data Annotations.

What is the best way to return consistent validation errors from .NET APIs?

The best way to return consistent validation errors from .NET APIs is by using endpoint filters that generate RFC-9457 ProblemDetails responses. This ensures standardized error formatting across Minimal APIs and MVC controllers regardless of the validation library used.

How do I prevent ReDoS attacks when validating inputs in .NET?

To prevent ReDoS attacks during input validation in .NET, apply security-focused checks that enforce regex timeouts. This skill provides these protections alongside request size limits and allow-list file upload validation to secure HTTP request data.

Can I use FluentValidation with .NET 10 Minimal API endpoint filters?

Yes, you can use FluentValidation with .NET 10 Minimal APIs by applying manual endpoint filters. This allows you to handle complex business rule validation while still returning standardized ProblemDetails responses for failed requests.

How do I validate file uploads and enforce request size limits in .NET?

To validate file uploads in .NET, apply security-focused checks that use allow-lists for file types and enforce strict request size limits. This skill integrates these checks into the validation pipeline alongside standard DTO validation.

Does .NET 10 built-in validation support Data Annotations and IValidatableObject?

Yes, .NET 10 built-in validation supports Data Annotations and IValidatableObject through the AddValidation method and source-generated validators. This allows you to use custom attributes alongside standard validation attributes for HTTP request inputs.