Boundary-Based Validation Guide

0•

Enforces architectural patterns that validate untrusted input at system boundaries while maintaining a trusted, type-safe internal core.

The Boundary-Based Validation skill (ET-0003) helps developers implement the 'Validate at trust boundaries, trust the core' architectural pattern. It guides you to check data integrity once at entry points—such as HTTP handlers, CLI parsers, or queue consumers—and then rely on strong types or value objects for internal logic. This approach eliminates redundant defensive guards, reduces code clutter, and ensures that validation failures result in meaningful errors at the system edge rather than generic exceptions deep within the call stack.

Características Principales

01Identifies and removes redundant internal null and range checks
02Provides patterns for mapping untrusted input to domain-specific types
03Reduces maintenance overhead by establishing a single source of truth for data rules
040 GitHub stars
05Promotes the use of Value Objects to encode invariants into the type system
06Centralizes validation logic at entry points like APIs and CLI arguments

Casos de Uso

01Migrating from primitive-based parameters to type-safe domain models
02Designing robust API entry points with centralized schema validation
03Refactoring legacy codebases with scattered defensive 'if' statements