code: public function beforeValidate($event)
      {
          foreach ($this->_relatedObjectsFlat as $relatedObject) {
              if (!$relatedObject->validate()) {
                  $this->owner->addError('_', $relatedObject->objectType->title->upperSingular . ' did not validate.');
                  $event->isValid = false;
  
                  return false;
              }
          }
  
          return true;
      }
docs: [[@doctodo method_description:beforeValidate]].
  
  @param [[@doctodo param_type:event]] $event [[@doctodo param_description:event]]
  
  @return [[@doctodo return_type:beforeValidate]] [[@doctodo return_description:beforeValidate]]