[TYPO3-mvc] Validating nested objects on create

Claus Fassing claus at fassing.eu
Mon Dec 20 12:19:40 CET 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Franz,

Am 08.12.2010 13:59, schrieb Franz Koch:
> I think I'll better show you some code then trying to explain everything :)
> 
> ---- part of my generic object validator ----------
> public function isValid($value) {
>     $dataType = $this->options['dataType'];

where do you call this validator from and how do you get the data type ?

This looks like you pass every nested object to this validator and
'dataType' is type of the passed object, right ?

Do you use a customer domain object validator (called from controller
action), walk through the nested objects and call the generic validator
from this ?

I only know this kind of validation.
Domainmodell annotation (which won't work with nested objects)
Domainmodell validator class
Controller argument validation

Are there any further options available ?


Regards Claus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNDzvLAAoJELsIv+audObf/BQH/3kySDYFLjlQ8faqBPWJFvj2
6e6Qhd6ijknhZd+dKKUDlh70qTHlKqcHrwzbFtJ9/dZOvOq71QcUJKd/sPuCf8hl
Jj3DoQELu0ax16f3CErSInyIZCPO5W1e/1g3PM/ZD0rMN9laWc0TcjpQx/w/nRGf
AyebCcipI2Zwm+oVxNmzE6OTlmwj/QhdHSCGPXjpL9VTVGKIJuRohQVlnBW13mtm
9O969m+HSCGbueeS/PXdQZPQLwtatxhdkHIESuHE2gh52oCf3GeirJM5LfKaQM07
6v3h1v04Rc6QdeBKnQsTshWZWBC6RKUkme/nJ3UkjEO3wn7MG+ZjKWOjU6MOraQ=
=Yst3
-----END PGP SIGNATURE-----


More information about the TYPO3-project-typo3v4mvc mailing list