Bug #31380

DocComment of Form.ValidationResultsViewHelper is incorrect

Added by Adrian Föder about 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
ViewHelpers
Start date:
2011-10-28
Due date:
% Done:

100%

Estimated time:
Has patch:
No

Description

The current DocBlock says:

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

(see the comment at the getFlattenedErrors() function:
Get a list of all Error objects recursively. The result is an array,
where the key is the property path where the error occured, and the
value is a list of all errors (stored as array)
)

so due to that error result nesting, it should read:

<f:form.validationResults>
    <f:if condition="{validationResults.flattenedErrors}">
        <dl class="errors">
            <f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath">
                <dt>{propertyPath}</dt>
                <dd><dl>
                    <f:for each="{errors}" as="error">
                        <dt>{error.code}</dt>
                        <dd>{error}</dd>
                    </f:for>
                </dl></dd>
            </f:for>
        </dl>
    </f:if>
</f:form.validationResults>

(disregard the fact that I use dl's here, although I like them more when it comes to nestings)

#1

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Target version set to 1.1
#2

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9478

#3

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9478

#4

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#5

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1.1 to 1.0.5
#6

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/10752

#7

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF