ValidationResultsViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

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

FinalYes

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()  : void
render()  : mixed

Properties

$escapeOutput

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

protected bool $escapeOutput = false

Methods

initializeArguments()

public initializeArguments() : void

render()

public render() : mixed
Return values
mixed

@todo: Really mixed here, not string?


        
On this page

Search results