ValidationResultsViewHelper extends AbstractViewHelper uses CompileWithRenderStatic

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:form.validationresults>

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

Table of Contents

Properties

$escapeOutput  : bool
As this ViewHelper renders HTML, the output must not be escaped.

Methods

initializeArguments()  : mixed
Initialize arguments
renderStatic()  : mixed

Properties

$escapeOutput

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

protected bool $escapeOutput = false

Methods

initializeArguments()

Initialize arguments

public initializeArguments() : mixed

renderStatic()

public static renderStatic(array<string|int, mixed> $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : mixed
Parameters
$arguments : array<string|int, mixed>
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface

        
On this page

Search results