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

ViewHelper which renders form validation results.

  <f:form.validationResults>
    <f:if condition="{validationResults.flattenedErrors}">
      <ul>
        <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
          <li>{propertyPath}
            <ul>
              <f:for each="{errors}" as="error">
                <li>{error.code}: {error}</li>
              </f:for>
            </ul>
          </li>
        </f:for>
      </ul>
    </f:if>
  </f:form.validationResults>

  <f:form.validationResults for="someProperty">
    <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
      <f:for each="{errors}" as="error">
          <p data-property-path="{propertyPath}">{error.code}: {error}</p>
      </f:for>
    </f:for>
  </f:form.validationResults>
Tags
see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-form-validationresults

Table of Contents

Properties

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

Methods

initializeArguments()  : void
render()  : string

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() : string
Return values
string

        
On this page

Search results