public function messages(string $slug = '', bool $by_slug = false): array
    {
        if (!$slug) { // All messages (i.e., for all slugs)?
            //
            if ($by_slug) { // All messages keyed by slug?
                return $this->errors ?: [$this->default_slug => $this->default_message];
                //
            } else { // Merge all messages into a single array.
                $messages = []; // Initialize array.

                foreach ($this->errors as $_slug => $_messages) {
                    $messages = array_merge($messages, $_messages);
                } // unset($_slug, $_messages); // Housekeeping.

                return $messages ?: [$this->default_message];
            }
        } else { // For a specific slug.
            $messages = $this->errors[$slug] ?? [];
            return $messages ?: [$this->default_message];
        }
    }