[FLOW3-general] Howto: Validation (Base Model and Supplemental)?

Alexander Schnitzler mail at alexanderschnitzler.de
Thu Oct 13 16:14:22 CEST 2011


Hey folks,
in the manual there is a part about validation, since today I guess.
http://flow3.typo3.org/fileadmin/manual/nightly/TheDefinitiveGuide/PartII/Validation.html

There it says:
> Base model and supplemental rules are not covered by this tutorial.

Alright, I tried using my own validator, validating a whole model.

> /**
>  * @param mixed $registration
>  * @return void
>  * @validate \Acme\Users\Domain\Validator\RegistrationValidator
>  */
> public function createAccountAction($registration) {
>   // something here
> }


Being familiar with extbase I hoped that would work fine, but an 
exception is thrown.

> TYPO3\FLOW3\Error\ErrorHandler::handleError(8, "Undefined index: argumentName", "/var/www/public_html/FLOW3/Data/Temporary/Developm…O3_FLOW3_Validation_ValidatorResolver_Original.php", 199, array)

I guess this is because validators only work for model arguments (yet?), 
don't they? Differs the way of validating whole models from the one in 
Extbase? Is there a tutorial for that or do I just have to validate 
without a validator class inside the controller?

Anyone having an answer to this?

Kind regards!
Alex


More information about the FLOW3-general mailing list