valid; } /** * Check if validation failed. */ public function isError(): bool { return !$this->valid; } /** * Get error message or null if valid. */ public function getError(): ?string { return $this->error; } /** * Get associated data. */ public function getData(): mixed { return $this->data; } }