system/Validation/Validation.php
public function showError(string $field, string $template = 'single'): string
	{
		if (! array_key_exists($field, $this->getErrors()))
		{
			return '';
		}

		if (! array_key_exists($template, $this->config->templates))
		{
			throw ValidationException::forInvalidTemplate($template);
		}

		return $this->view->setVar('error', $this->getError($field))
						  ->render($this->config->templates[$template]);
	}
public function showError(string $field, string $template = 'single'): string
	{
		if (! array_key_exists($field, $this->getErrors()))
		{
			return '';
		}

		if (! array_key_exists($template, $this->config->templates))
		{
			throw ValidationException::forInvalidTemplate($template);
		}

		return $this->view->setVar('error', $this->getError($field))
						  ->render($this->config->templates[$template]);
	}
Displays a single error in formatted HTML as defined in the $template view.

@param string $field
@param string $template

@return string