Skip to content

Validation Tools

This page outlines validation utilities and patterns used across the plugin.

New in v5.0.0: GBInjectorSystem automatically validates configuration after dependency injection completes. No manual validation calls are required.

  1. GBInjectorSystem completes dependency injection for all nodes
  2. Automatic validation runs deferred after initial_injection_completed
  3. Configuration issues are automatically logged if found
  4. Developers receive feedback without manual setup
  • 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
  • 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.
  • 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.