[TYPO3-mvc] 6.2: How to debug recursive validation

Matthew Colton mat.colton at web-xs.de
Mon May 19 20:31:58 CEST 2014


Hi Helmut,
thanks for the advice!

Maybe you could take a look at my post "Extbase: Edit hidden records in FE"?
Thanks in advance.
-- 
Cheers
Matthew

Am 19.05.2014 18:16, schrieb Helmut Hummel:
> Hi Till!
>
> On 17.05.14 15:52, g4-lisz at tonarchiv.ch wrote:
>
>> Is there a way to make the errors a little bit more
>> communicative?
>
> The error message you see is compiled in the errorAction in the
> ActionController class in Extbase.
>
> You can override this method in your controller (be careful to copy
> and paste everything necessary for the rewritten property mapper you
> see in this method).
>
> In this method you have access to the error messages from validation:
>
> By calling $this->arguments->getValidationResults()
>
> You could e.g. iterate over the flattened errors and add them to the
> message, but be careful and only do this during debugging, as we
> removed verbosity there because of a security issue[1]
>
>
> foreach
> ($this->arguments->getValidationResults()->getFlattenedErrors() as
> $propertyPath => $errors) {
>     foreach ($errors as $error) {
>         $message .= 'Error for ' . $propertyPath . ':  ' .
> $error->render() . PHP_EOL;
>     }
> }
>
>
> I would be interested in your findings.
>
>
> Kind regards,
> Helmut
>
> [1]https://review.typo3.org/26217
>




More information about the TYPO3-project-typo3v4mvc mailing list