[TYPO3-mvc] Problem with validate/dontvalidate

Joerg Schoppet joerg at schoppet.de
Thu May 23 15:01:44 CEST 2013


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