public function error(string $name = '', bool $first = false)
    {
        $errors = $this->errors();

        if (empty($name)) {
            $name = $this->getName();
        }

        if ($first) {
            return $errors->first($name);
        }

        return $errors->get($name);
    }