Validation Tools
This page outlines validation utilities and patterns used across the plugin.
Automatic Configuration Validation
Section titled “Automatic Configuration Validation”New in v5.0.0: GBInjectorSystem automatically validates configuration after dependency injection completes. No manual validation calls are required.
How It Works
Section titled “How It Works”- GBInjectorSystem completes dependency injection for all nodes
- Automatic validation runs deferred after
initial_injection_completed - Configuration issues are automatically logged if found
- Developers receive feedback without manual setup
Benefits
Section titled “Benefits”- Zero Setup: Validation happens automatically
- Error Prevention: No possibility of forgetting validation calls
- Proper Timing: Validation occurs after all dependencies are wired
- Consistent Behavior: All Grid Building systems validate automatically
Validation Contract
Section titled “Validation Contract”- validate() methods return a boolean (success/failure). When false, inspect issues collected via:
- get_runtime_issues() in runtime
- get_editor_issues() in editor
- Use GBLogger to log actionable diagnostics during validation.
Key components
Section titled “Key components”- PlacementValidator — Orchestrates rule checks
- RuleResult — Captures per-rule outcomes
- RuleCheckIndicator — Visualizes rule feedback
- Keep rules stateless and fast; cache expensive lookups at the system level when needed.
- Prefer explicit settings resources (e.g., ValidPlacementRuleSettings) to make validation predictable and testable.