[TYPO3-mvc] Validate form field depending on another passed objects property
Jan Kornblum
jan.kornblum at gmx.de
Thu Nov 13 12:58:03 CET 2014
Hi newsgroup,
i have to validate a form property depending on the value of another
passed objects property. The two objects passed to the form
(createAction) are:
- $booking (the object to be created)
- $event.
The property "$booking->extTermsAndConditions" should be validated as
boolean (and must be TRUE) when "$event->extTermsAndConditonsRequired"
is TRUE.
In case of "$event->extTermsAndConditionsRequired" is FALSE the
property "$booking->extTermsAndConditions" should not be validated at
all! So, i cannot set the validation directly in the model.
I want the validation results to be available in the form
("f:form.validationResults"), too.
How can i accomplish this?
Kind regards, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list