Version: v1.2.3 | Status: Active | Last Updated: March 2026
Validation module providing unified input validation framework with support for JSON Schema, Pydantic models, and custom validators. Consolidates validation logic currently scattered across modules.
- Schema-agnostic validation interface
- Support for multiple validation libraries
- Pluggable validator system
- Unified validation error format
- Consistent validation patterns
- Integration with error handling
- Essential validation operations
- Minimal dependencies
- Focus on common validation scenarios
- Working implementations for common validation needs
- Support for nested validation
- Custom validator registration
- Unit tests for all validators
- Integration tests with real schemas
- Edge case validation
- Complete API specifications
- Usage examples for each validator type
- Schema format documentation
graph TD
ValidatorInterface[Validator Interface]
JSONSchemaValidator[JSON Schema Validator]
PydanticValidator[Pydantic Validator]
CustomValidator[Custom Validator]
ValidationManager[Validation Manager]
ValidatorInterface --> JSONSchemaValidator
ValidatorInterface --> PydanticValidator
ValidatorInterface --> CustomValidator
ValidationManager --> ValidatorInterface
- Schema Validation: Validate data against JSON Schema
- Model Validation: Validate against Pydantic models
- Custom Validators: Register and use custom validation functions
- Error Reporting: Structured validation error messages
- Nested Validation: Support for complex nested structures
config_management/- Configuration validationapi/- API request/response validationdocuments/- Document schema validation
- Type hints for all functions
- PEP 8 compliance
- Comprehensive error handling
- ≥80% coverage
- Validator-specific tests
- Schema validation tests
- README.md, AGENTS.md, SPEC.md
- API_SPECIFICATION.md
- USAGE_EXAMPLES.md
class Validator:
def validate(data: Any, schema: Any) -> ValidationResult
def is_valid(data: Any, schema: Any) -> bool
def get_errors(data: Any, schema: Any) -> list[ValidationError]- Implement Validator interface for each type
- Provide structured error messages
- Support nested validation
- Handle validation errors gracefully
- Integrate with config_management
- Add validation to API endpoints
- Support document validation
- Parent: codomyrmex
- Related: config_management, api