‪TYPO3CMS  ‪main
TYPO3\CMS\Fluid\ViewHelpers\Form\ValidationResultsViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Form\ValidationResultsViewHelper:

Public Member Functions

 initializeArguments ()
 

Static Public Member Functions

static mixed renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Protected Attributes

bool $escapeOutput = false
 

Detailed Description

Validation results ViewHelper

Examples

Output error messages as a list::

<f:form.validationResults> <f:if condition="{validationResults.flattenedErrors}">

f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath"> {propertyPath}

f:for each="{errors}" as="error"> {error.code}: {error} </f:for> </f:for> </f:if> </f:form.validationResults>

Output::

  • ‪1234567890: Validation errors for argument "newBlog"

Output error messages for a single property::

<f:form.validationResults for="someProperty"> <f:if condition="{validationResults.flattenedErrors}">

f:for each="{validationResults.errors}" as="error"> {error.code}: {error} </f:for> </f:if> </f:form.validationResults>

Output::

  • ‪1234567890: Some error message

Definition at line 76 of file ValidationResultsViewHelper.php.

Member Function Documentation

◆ initializeArguments()

TYPO3\CMS\Fluid\ViewHelpers\Form\ValidationResultsViewHelper::initializeArguments ( )

Definition at line 85 of file ValidationResultsViewHelper.php.

◆ renderStatic()

static mixed TYPO3\CMS\Fluid\ViewHelpers\Form\ValidationResultsViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static
Returns
‪mixed
Todo:
‪: Really mixed here, not string?

Definition at line 94 of file ValidationResultsViewHelper.php.

References $output.

Member Data Documentation

◆ $escapeOutput

bool TYPO3\CMS\Fluid\ViewHelpers\Form\ValidationResultsViewHelper::$escapeOutput = false
protected

As this ViewHelper renders HTML, the output must not be escaped.

Definition at line 83 of file ValidationResultsViewHelper.php.