lib/components/db/behaviors/RelatedObjects.php
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;
    }
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;
    }
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 ; }
[[@doctodo method_description:beforeValidate]].

@param [[@doctodo param_type:event]] $event [[@doctodo param_description:event]]

@return [[@doctodo return_type:beforeValidate]] [[@doctodo return_description:beforeValidate]]
[[ @doctodo method_description : beforeValidate ]] .