[TYPO3-mvc] Re: The given subject was not a collection..

Philipp Wrann philippwrann at gmail.com
Wed Mar 26 17:37:53 CET 2014


I try to validate a new object manually, in the action i get an array passed and build a valdationObject like this:
$validatorResolver = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Validation\\ValidatorResolver');
/* @var $validatorResolver \TYPO3\CMS\Extbase\Validation\ValidatorResolver */
$modelName = $this->requestService->getModelName($request->getKey());
$validator = $validatorResolver->getBaseValidatorConjunction($modelName);

I need this because i want to use different request objects with different validations

now the problem is, that an array like

request : {key:1,identifier:1,package:12}

is validated recursively, but i am passing a allready created entity...

now of course i get validation errors for those properties.

How do i solve this?


More information about the TYPO3-project-typo3v4mvc mailing list