[TYPO3-mvc] Validation infinite loop

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Sep 10 10:30:52 CEST 2010


Hey,

> I've got the problem that if I want to validate an object and the user puts invalid or no values in one of the required properties I get an error (101 iterations - infinite loop).
>
> The only solution I have found for that issue is to add @dontvalidate - but that doesn't solve the problem.
>
> So what can I do if I don't want to check all params in the target action manually?
>
> Btw: new>  create does work but edit>  update not

you have to add @dontvalidate to your "new" and your "edit" action, but 
leave it from "create" and "update". This way, your object is 
automatically validated on create and update. If validation fails there, 
the new/edit action will be triggered again, so those MUST NOT validate 
the object, otherwise you end up in a infinite loop.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list