private function getFormattedErrors($name)
    {
        if (!$this->hasErrors($name)) {
            return '';
        }

        $errors = $this->session->get('errors');

        return $errors->first($this->transformKey($name), '<div class="invalid-feedback">:message</div>');
    }