mini\Database\WriteValidator final class

Documentation

Validates data before database writes

Centralizes validation logic for insert/update operations. Both PDODatabase and VirtualDatabase use this to ensure consistent validation.

Validation flow:

  1. Purpose-scoped validation (Create or Update) - validates fields with that purpose
  2. Core validation - validates fields without purpose (always runs)

Both must pass for the write to proceed.

Methods (3)

Validate data for INSERT operation

Validate data for UPDATE operation

Core validation logic

Source

src/Database/WriteValidator.php:21-76