ABP Validation Skill

Validate ABP Framework DTOs and DI services with Data Annotations and FluentValidation.

13|4|Updated May 27, 2026
One-click install
npx skills add https://github.com/burakdmir/abp-skills --skill abp-validation-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ABP Validation Skill
Source: https://github.com/burakdmir/abp-skills/tree/main/claude/abp-validation
Command: npx skills add https://github.com/burakdmir/abp-skills --skill abp-validation-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ABP input validation fails inconsistently across DTOs and services, making it hard to enforce rules and return uniform, structured validation errors to clients.

Core Features & Use Cases

  • Data Annotation validation on DTOs for declarative rules like required fields and string/number constraints.
  • IValidatableObject for DTO-level custom validation when logic is tightly coupled to the DTO shape.
  • FluentValidation + ABP auto-discovery to implement richer, cross-property validation rules in validator classes.
  • IValidationEnabled interception to enforce validation automatically on DI-registered services, including the correct requirements for virtual methods.
  • Standardized error handling via AbpValidationException and validationErrors JSON for reliable HTTP 400 responses.

Real-world use case: Validate Create/Update DTOs for an ABP application service so that invalid input (missing required fields, out-of-range numbers, or inconsistent property combinations) returns a consistent 400 response with field-level validationErrors.

Quick Start

Ask an AI to generate an ABP v10.4 DTO with Data Annotations plus a FluentValidation validator and explain how AbpValidationException will produce the correct validationErrors response.

Frequently Asked Questions about ABP Validation Skill

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

FAQPage Schema
How do I validate ABP DTOs using FluentValidation and Data Annotations?

You validate ABP DTOs by combining Data Annotations for simple constraints and FluentValidation for complex rules. ABP automatically triggers these validators during application service execution to return consistent HTTP 400 responses.

Why does ABP input validation fail inconsistently across application services?

ABP input validation fails inconsistently when services lack IValidationEnabled interception or proper DI registration. Standardizing via AbpValidationException and validationErrors JSON serialization ensures uniform HTTP 400 responses across all application services.

Can I use IValidatableObject for custom DTO validation logic in ABP?

Yes, you can implement IValidatableObject for DTO-level custom validation when logic is tightly coupled to the DTO shape. ABP processes this interface alongside Data Annotations to enforce rules before service execution.

Does ABP Framework v10.4 support automatic service-level validation interception?

Yes, ABP Framework v10.4 supports automatic validation interception via IValidationEnabled on DI-registered services. This requires methods to be virtual so the interception layer can enforce validation rules correctly.

What is the best way to return consistent HTTP 400 validation errors in ABP?

The best way to return consistent HTTP 400 validation errors in ABP is to throw AbpValidationException. This mechanism automatically serializes IHasValidationErrors into a structured validationErrors JSON response for clients.