[TYPO3-mvc] Get another property in custom validator

Henk Scholten henk at wolfsstyle.nl
Thu Oct 31 14:10:42 CET 2013


Tnx for your answer Philipp.
However i still get a string in stead of the model in my validator:

Model:

/**
  * passwordRepeat
  *
  * @var \string
  * @validate $newUser \Pr\Sp\Validation\Validator\RepeatValidator
  */
protected $passwordRepeat;

Action:

/**
  * action create
  *
  * @param \Pr\Sp\Domain\Model\User $newUser
  * @return void
  */
public function createAction(\Profinit\Spiritit\Domain\Model\User 
$newUser) {
}

Regards,
Henk

Philipp schreef op 31-10-13 13:49:
> For that purpose you need an object validator and define the validation
> like
>
> @validate $object \Path\To\Your\Validator
>
> in your controller actions doccomment.



More information about the TYPO3-project-typo3v4mvc mailing list