Validation Tools
This page outlines validation utilities and patterns used across the plugin.
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.