[TYPO3-mvc] Validation (f3-form-error) of a child ObjectStroage (1:n)

Jürgen Pfusterschmied j.pfusterschmied at gmx.at
Mon Nov 2 13:06:41 CET 2015


Hi,

how to add an error class to a objectstorage in an Parent/Child relation (1:n) usind FLUID?

My Parent Model has a child property e.g.:
Parent Model: Book
Child Model: Author
Child Property: Name
Relation 1:n

The recursive validation of my Custom Validator returns an error in the child property "name" and returns an error, which I can catch in the errorAction:
book.author.00000000413f907700007f9825f9a177.name:The given subject was empty. 

PROBLEM:
in the newAction I'm using: 
<f:form.textarea property="abstracttxt.NEW.name"/>

in the editAction I'm using: 
<f:for each="{book.author}" as="auth" key="uid" iteration="counter">
<f:form.textarea property="book.{auth.uid}.name"/>
</f:for>

Extbase/Fluid usind splobjecthashes instead of the UID in the errorAction. Therefore the form element "NEW" or the "UID" will not be found and the error class will not appear.

How is the correct way to do this in Extbase/Fluid?

Best regards, Jürgen


More information about the TYPO3-project-typo3v4mvc mailing list