Render form errors.
If form is configured to render all errors together at form beginning,
this function completes all form errors into `div.errors` with `div.error` elements
inside containing each single errors message.
@return string
188834
public function RenderErrors () {
		$this->form->PreDispatch();
		$result = '';
		$errors = & $this->form->GetErrors();
		if ($errors && $this->form->GetErrorsRenderMode() == \MvcCore\Ext\Forms\IForm::ERROR_RENDER_MODE_ALL_TOGETHER) {
			$result .= '<div class="errors">';
			foreach ($errors as & $errorMessageAndFieldNames) {
				list($errorMessage, $fieldNames) = $errorMessageAndFieldNames;
				$result .= '<div class="error ' . implode(' ', $fieldNames) . '">'.$errorMessage.'</div>';
			}
			$result .= '</div>';
		}
		return $result;
	}
151872
public function renderBegin()
	{
		foreach ($this->form->getControls() as $control) {
			$control->setOption(RendererOptions::_rendered, FALSE);
		}

		$prototype = $this->form->getElementPrototype();
		$prototype = $this->configElem('form', $prototype);

		if ($this->form->isMethod('get')) {
			$el = $prototype;
			/** @noinspection PhpUndefinedFieldInspection */
			$query = parse_url($el->action, PHP_URL_QUERY);
			/** @noinspection PhpUndefinedFieldInspection */
			$el->action = str_replace("?$query", '', $el->action);
			$s = '';
			foreach (preg_split('#[;&]#', $query, NULL, PREG_SPLIT_NO_EMPTY) as $param) {
				$parts = explode('=', $param, 2);
				$name = urldecode($parts[0]);
				if (!isset($this->form[ $name ])) {
					$s .= Html::el('input', ['type' => 'hidden', 'name' => $name, 'value' => urldecode($parts[1])]);
				}
			}

			return $el->startTag() . "\n$s";
		} else {
			return $prototype->startTag();
		}
	}
930978
public function getValidationErrors()
    {
        return [
            /** Bundle option related errors */
            __('The options you selected are not available.')->render(),
            __('The required options you selected are not available.')->render(),
            __('Please specify product option(s).')->render(),
            __('Please select all required options.')->render(),
            __('You need to choose options for your item.')->render(),

            /** Input field related errors */
            __('The text is too long.')->render(),
            __('Please specify product\'s required option(s).')
        ];
    }
1111794
public static function renderError()
    {
        try
        {
            $_errorTemplate = \Kisma::get( 'app.error_template', '_error.twig' );

            Render::twigView(
                $_errorTemplate,
                array(
                    'base_path'         => \Kisma::get( 'app.base_path' ),
                    'app_root'          => \Kisma::get( 'app.root' ),
                    'page_title'        => 'Error',
                    'error'             => static::$_error,
                    'page_header'       => 'Something has gone awry...',
                    'page_header_small' => 'Not cool. :(',
                    'navbar'            => array(
                        'brand' => 'Kisma v' . \Kisma::KismaVersion,
                        'items' => array(
                            array(
                                'title'  => 'Kisma on GitHub!',
                                'href'   => 'http://github.com/kisma/kisma/',
                                'target' => '_blank',
                                'active' => 'active',
                            ),
                        ),
                    ),
                )
            );

            return true;
        }
        catch ( \Exception $_ex )
        {
            Log::error( 'Exception during rendering of error: ' . print_r( static::$_error, true ) );
        }

        return false;
    }
691286
public function actionError()
	{
		$response = array();
		$this->message = Yii::t('Api.Controller', 'An unexpected error occured.');
		if ($error=Yii::app()->errorHandler->error)
		{
			$this->status = $error['code'];
			$this->message = $error['message'];
			if (YII_DEBUG)
				$response = $error;
		
		}

		return $this->renderOutput($response);
	}
556407
public function render()
    {
        // Set the request arguments as GET parameters
        $_GET = $this->getRequestArguments();

        try {
            $this->controllerContext->getRequest()->setOriginalRequestMappingResults($this->validationErrors);

            // Render the content element
            $result = $this->beautify($GLOBALS['TSFE']->cObj->cObjGetSingle('RECORDS', $this->config));

            // In case of an error
        } catch (\Exception $e) {
            $result = '<pre class="error"><strong>'.$e->getMessage().'</strong>'.PHP_EOL
                      .$e->getTraceAsString().'</pre>';
        }

        return $result;
    }
756029
def _render_errors(field):
    
    template = '{0}/layout/field_errors.html'.format(appsettings.CRISPY_TEMPLATE_PACK)
    return render_to_string(template, {
        'field': field,
        'form_show_errors': True,
    })
1162830
public function render()
	{
		$html = array();

		// Start toolbar div.
		$html[] = '<div class="toolbar-list" id="' . $this->_name . '">';
		$html[] = '<ul>';

		foreach ($this->_bar as $key => $button)
		{
			$this->_bar[$key][9] = array();
			if ($button[0] == 'Separator')
			{
				continue;
			}
			if (!isset($this->_bar[$key - 1]) || $this->_bar[$key - 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'first';
			}
			if (!isset($this->_bar[$key + 1]) || $this->_bar[$key + 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'last';
			}
		}

		// Render each button in the toolbar.
		foreach ($this->_bar as $button)
		{
			$html[] = $this->renderButton($button);
		}

		// End toolbar div.
		$html[] = '</ul>';
		$html[] = '</div>';

		return implode("\n", $html);
	}
328823
public function render ($content = null)
		{
			// Custom error output.
			$errors = $this->model->getErrors($this->attribute);

			if (count($errors) == 0)
				$this->parts[ '{error}' ] = '';
			else
			{
				$class = isset($this->errorOptions[ 'class' ]) ? ' class="' . $this->errorOptions[ 'class' ] . '"' : '';
				$this->parts[ '{error}' ] = '<div' . $class . '><ul class="list-unstyled">';
				foreach ($errors as $e)
				{
					$this->parts[ '{error}' ] .= '<li>' . $e . '</li>';
				}
				$this->parts[ '{error}' ] .= '</ul></div>';
			}

			return parent::render($content);
		}
172272
public function actionError()
	{
		if($error=Yii::app()->errorHandler->error)
		{
			if(Yii::app()->request->isAjaxRequest)
				echo $error['message'];
			else
				$this->render('error', $error);
		}
	}
1142677
public function seeFormHasErrors()
    {
        $viewErrorBag = $this->app->make('view')->shared('errors');

        $this->assertGreaterThan(0, count($viewErrorBag), 'Expecting that the form has errors, but there were none!');
    }
875777
protected function getError()
	{
		return $this->form->error($this->model, $this->attribute, $this->errorOptions);
	}
1115271
public function errors() : array
    {
        $errors = $this->privateErrors();
        foreach ((array)$this as $element) {
            if (is_string($element)) {
                continue;
            }
            $name = $element->getElement()->name();
            if ($error = $element->getElement()->errors()) {
                $errors = array_merge($errors, [$name => $error]);
            }
        }
        return $errors;
    }
1276315
public function render() {
		$flashMessages = $this->controllerContext->getFlashMessageContainer()->getMessagesAndFlush();
		if (count($flashMessages) > 0) {
			$tagContent = '';
			foreach ($flashMessages as $singleFlashMessage) {

				// set the severity
				$severity = 'alert-info';

				switch ($singleFlashMessage->getSeverity()) {
					case 'Notice':	$severity = 'alert-info';
						break;
					case 'Information':	$severity = 'alert-info';
						break;
					case 'OK':	$severity = 'alert-success';
						break;
					case 'Warning': $severity = 'alert-warning';
						break;
					case 'Error': $severity = 'alert-error';
						break;
				}

				// check if there's a title and use it then
				$title = '';
				if ($singleFlashMessage->getTitle() != '') {
					$title = '<strong>' . $singleFlashMessage->getTitle() . '</strong>&nbsp;';
				}

				// put it all together
				$tagContent .= '<div class="alert ' . $severity . '"><strong>' . $title . '</strong>' .
					$singleFlashMessage->getMessage()  . '</div>';
			}

			$this->tag->setContent($tagContent);
			return $this->tag->render();
		}
		return '';
	}
1217442
public function render()
    {
        $result = '<form method="' . $this->getMethod() . '" action="' . $this->getAction() . '">' . "\r\n";

        $result .= $this->renderFields();

        $result .= '</form>' . "\r\n";

        return $result;
    }
1358501
protected function renderSubForm()
    {
        $html = '';
        foreach ($this->form as $key => $input) {
            $html .= $this->renderInput($key, $input);
        }

        return $html;
    }
468670
public function Errors() {
      $Return = '';
      if (is_array($this->_ValidationResults) && count($this->_ValidationResults) > 0) {
         $Return = "<div class=\"Messages Errors\">\n<ul>\n";
         foreach($this->_ValidationResults as $FieldName => $Problems) {
            $Count = count($Problems);
            for($i = 0; $i < $Count; ++$i) {
               if (substr($Problems[$i], 0, 1) == '@')
                  $Return .= '<li>'.substr($Problems[$i], 1)."</li>\n";
               else
                  $Return .= '<li>' . sprintf(
                     T($Problems[$i]),
                     T($FieldName)) . "</li>\n";
            }
         }
         $Return .= "</ul>\n</div>\n";
      }
      return $Return;
   }