[TYPO3-mvc] updateAction ignores validation

ondro ogrosko at gmail.com
Sat Sep 12 14:56:26 CEST 2015


Hey
I stuck in one problem
I have classical actions in my app (newAction, createAction, updateAction, etc)

createAction looks like this:

public function createAction(\Some\Kind\Of\Domain\Model $model) {
   [... logic of action]
}

model look like this:

/**
	 * title
	 *
	 *  string
	 *  NotEmpty
	 */
	protected $title = '';

	/**
	 * start
	 *
	 *  \DateTime
	 *  NotEmpty, DateTime
	 */
	protected $start = NULL;

	/**
	 * end
	 *
	 *  \DateTime
	 *  NotEmpty, DateTime
	 */
	protected $end = NULL;

If I run createAction whole validation runs properly
But if I run updateAction

public function updateAction(\Some\Kind\Of\Domain\Model $model) {
 [... logic of action]
}

validation of model is absolutelly ignored. I can submit empty 'title, start, end' property and object is saved. Can you tell me why?
But if I fill start or end property validation of DateTime runs properly (that mean I got proper errorAction with DateTime validation results)

Debuging of that I lost 10years of my life. Can you help me.


More information about the TYPO3-project-typo3v4mvc mailing list