[TYPO3-mvc] Re: Validation fails - but not going back to newAction
Philipp Wrann
philippwrann at gmail.com
Mon Jun 23 08:09:52 CEST 2014
I dont see the problem but i would use a generic object validator. You dont have to set the annotation that way and as i see it, it is the common way.
Simply do all property-validation via the model itself (eg set @validate EmailAddress as annotation in the mail address property) and the extended validation in the generic object validator.
You have to create a new class:
\LF\LfNewsletterSubscription\Domain\Validator\Recipient
It extends the abstractValidator and passes the validated object. There you can inject your repository (to check, if the address is allready registered) or do combination-validation (password- and email confirmations for example).
Your Syntax (@validate $newRecipient LF.LfNewsletterSubscription:IsUniqueEmail) looky very odd to me, never seen that before.
More information about the TYPO3-project-typo3v4mvc
mailing list