Package

ViewHelpers

ViewHelper Documentation

validation.results

Validation results view helper

= Examples =

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

<ul class="errors">
  <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:validation.results>

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

<ul class="errors">
  <f:for each="{validationResults.errors}" as="error">
    <li>{error.code}: {error}</li>
  </f:for>
</ul>

</f:if> </f:validation.results>

Arguments

for string

The name of the error name (e.g. argument name or property name). This can also be a property path (like blog.title), and will then only display the validation errors of that property.

as string

The name of the variable to store the current error

ViewHelper Resources

Schema Resources