alba-input

Validate .NET request objects with FluentValidation-based cached validators.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/RushuiGuan/claude --skill alba-input
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alba-input
Source: https://github.com/RushuiGuan/claude/tree/main/skills/alba-input
Command: npx skills add https://github.com/RushuiGuan/claude --skill alba-input

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill streamlines and standardizes request validation in .NET projects by encapsulating validation logic and promoting reusable patterns instead of scattered FluentValidation rules.

Core Features & Use Cases

  • Request Validation Pattern: Centralize validation for incoming requests by exposing a static Validator on the request type.
  • Validated String Type: Provide type-safe wrappers for common string inputs to enforce shape and basic constraints.
  • Reusable Validators: Use ICached<T> to share a single validator instance across multiple requests to reduce allocations.
  • Composition with ASP.NET Core: Seamlessly integrate with model binding and HasProblem for RFC 7807-style error responses.
  • Use Case: When adding a new endpoint that accepts a request payload, you can generate a strongly-typed request with a cached validator and reuse the same validation rules across controllers.

Quick Start

Create a request class that implements IRequest<T>, define a static Validator using a cached validator in the same file, and use request.Validate() during handling.

Frequently Asked Questions about alba-input

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

FAQPage Schema
How do I centralize FluentValidation rules in .NET controllers?

Input validation for ASP.NET Core requests is enforced by defining a static FluentValidation validator on the request type and invoking Validate() in the controller, returning RFC 7807 problem details if validation fails.

What is the request pattern for FluentValidation in ASP.NET Core?

The request pattern for FluentValidation involves creating a request class that implements IRequest<T>, exposing a static Validator using a cached instance, and calling Validate() to centralize validation rules across controllers and services.

Does ASP.NET Core integration support RFC 7807 validation error responses?

Yes, ASP.NET Core integration supports RFC 7807 validation error responses by using the HasProblem feature, which seamlessly integrates with model binding to return standardized problem details for invalid incoming request objects.

How do I reduce allocations when validating .NET requests?

To reduce allocations when validating .NET requests, use the ICached<T> interface to share a single validator instance across multiple requests, preventing the creation of new validator objects for each validation cycle.

Can I enforce type-safe string inputs in .NET request validation?

Yes, you can enforce type-safe string inputs in .NET request validation by using provided type-safe wrappers that enforce shape and basic constraints for common string inputs within your strongly-typed request objects.