be-create-validators

Generate FluentValidation validators for DTOs in .NET Core projects.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/bmslabs/bmlabs-projects-templates --skill be-create-validators
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: be-create-validators
Source: https://github.com/bmslabs/bmlabs-projects-templates/tree/main/api-dotnet/.github/skills/be-create-validators
Command: npx skills add https://github.com/bmslabs/bmlabs-projects-templates --skill be-create-validators

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation of FluentValidation validators for DTOs in .NET Core projects, ensuring consistent validation rules, naming, and integration across services.

Core Features & Use Cases

  • Base validator templates that follow the project's conventions and provide a ready-to-use AbstractValidator<T> skeleton.
  • Common validation rules including required fields, string length, numeric ranges, date validations, enum checks, and conditional validations.
  • Helper utilities for complex or custom validations (e.g., regex-based formats, cross-field comparisons).
  • Easy DI integration guidance to register validators in the ASP.NET Core pipeline and enable testability.
  • Clear XML-style documentation comments and descriptive error messages aligned with the project's messaging standards.

Quick Start

Generate a validator for YourDto using the standard template and register it with the DI container.

Frequently Asked Questions about be-create-validators

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

FAQPage Schema
How do I generate FluentValidation validators for multiple DTOs in a .NET Core project?

You can generate FluentValidation validators for multiple DTOs by creating AbstractValidator<T> classes with standard rules for required fields, string length, numeric ranges, and dates. This ensures consistent validation and naming conventions across your .NET Core project.

What validation rules can I apply to DTOs using FluentValidation in .NET?

FluentValidation rules for DTOs include required fields, string length constraints, numeric ranges, date validations, enum checks, and conditional logic. You can also use helper utilities for regex-based formats and cross-field comparisons to handle complex validation scenarios.

How do I register FluentValidation validators in the ASP.NET Core DI container?

You register FluentValidation validators in the ASP.NET Core DI container to enable automatic validation in the pipeline. This skill provides DI integration guidance to register your AbstractValidator<T> classes, ensuring testability and consistent validation across services.

Does FluentValidation support conditional logic and cross-field comparisons for DTO validation?

FluentValidation supports conditional logic and cross-field comparisons for DTO validation. Using helper utilities, you can implement regex-based formats and custom rules alongside standard validations like required fields, string length, numeric ranges, and date checks.

What is the best way to enforce consistent naming and namespace conventions for .NET validator classes?

The best way to enforce consistent naming and namespace conventions is by generating validator classes from base templates that follow your project's conventions. This ensures proper AbstractValidator<T> inheritance, clear XML documentation, and descriptive error messages.

Can I add XML documentation comments and custom error messages to FluentValidation validators?

You can add XML-style documentation comments and descriptive error messages to FluentValidation validators. This skill ensures error messages align with your project's messaging standards while generating AbstractValidator<T> classes with standard and custom validation rules.