[TYPO3-dev] typo3 6.2 - extbase object validator called multiple	times
    Alex Bigott 
    a.bigott at pixel-ink.de
       
    Wed Apr 30 15:24:24 CEST 2014
    
    
  
hi,
 
i am just going through the book "typo3 extbase" from patrick lobacher and i
am having some issues with an object validator.
 
the validator is working fine and gets called automatically. it is placed
under:
typo3conf/ext/simpleblog/Classes/Domain/Validator/BlogValidator.php
 
in the validator i add errors using:
$this->result->forProperty('description')->addError(new
\TYPO3\CMS\Extbase\Error\Error('my error message', 1398857830));
 
if i output the errors in a fluid form, i get each error twice(!) when
using:
 
<f:form.validationResults for="{object}">          
    <f:for each="{validationResults.flattenedErrors}" as="errors"
key="propertyPath">
        {propertyPath}
        <ul>
            <f:for each="{errors}" as="error">
                <li>
[.]
 
as i was debugging the validator method i noticed, that i seem to have a
real issue, because the structure:
$this->result->propertyResults->title->parent->propertyResults->title->paren
t->propertyResults..
seems to go on and on and on forever.
 
as validating like this seems to be a rather common task i would really like
to know what i am doing wrong to cause the validator being called too often
- especially since i am not calling it at all but it is automated by
extbase.
 
thanks a lot
 
alex
    
    
More information about the TYPO3-dev
mailing list