[TYPO3-mvc] Problem with validate/dontvalidate
Anja Leichsenring
aleichsenring at ab-softlab.de
Thu May 23 17:33:23 CEST 2013
Hi,
the annotiation for ignoring Validation with the rewritten
propertyMapper (that is default in 6.1) is named
@ignorevalidation
@dontvalidate has no effect anymore, except you use the old propertyMapper.
see the change here: http://forge.typo3.org/issues/27656
Additionally I recommend you to check your new action.
Kind regards
Anja
On 05/23/2013 03:01 PM, Joerg Schoppet wrote:
> Hi,
>
> I don't get it anymore, please help.
>
> TYPO3 6.1
>
> I have a a controller to edit/update users.
>
> Creating of new users is working and also the update of existing ones.
>
> The User-Model has the property "zip" and for this I now wanted to add a
> validation, so I changed the phpdoc:
> /**
> * ZIP
> *
> * @var string
> * @validate RegularExpression(regularExpression = '/[0-9]{5}$/')
> */
> protected $zip;
>
> With the new/create-Actions everything is working as expected and as
> soon as I don't put in 5 digits I get a FormError-message displayed in
> the new-form.
>
> But it isn't working with the edit/update-Actions :(
>
> I always get the following error-meesage
> <message>
> Could not ultimately dispatch the request after 101 iterations. Most
> probably, a @dontvalidate annotation is missing on re-displaying a form
> with validation errors.
> </message>
>
> These are the signatures of the edit/update-Actions:
> /**
> * action edit
> *
> * @param \MyVendor\Example\Domain\Model\User $user
> * @dontvalidate $user
> * @return void
> */
> public function editAction(\MyVendor\Example\Domain\Model\User
> $user) {
> }
>
> /**
> * action update
> *
> * @param \MyVendor\Example\Domain\Model\User $user
> * @return void
> */
> public function updateAction(\MyVendor\Example\Domain\Model\User
> $user) {
> }
>
> I deactivated ZendDebugger, memcache and apc.
> I restarted apache.
> I cleaned the cache in TYPO3.
>
>
> Where is the problem?
>
>
> Regards
> Joerg
More information about the TYPO3-project-typo3v4mvc
mailing list