/**
  * Validates related records for an fActiveRecord object
  *
  * @internal
  *
  * @param  fActiveRecord $object            The object to validate
  * @param  array         &$values           The values for the object
  * @param  array         &$related_records  The related records for the object
  * @return array         An array of messages
  */
 public static function validateRelated($object, &$values, &$related_records)
 {
     $class = get_class($object);
     $table = fORM::tablize($class);
     $validation_messages = array();
     // Check related rules
     foreach (self::$related_one_or_more_rules[$class] as $related_class => $routes) {
         foreach ($routes as $route => $enabled) {
             $message = self::checkRelatedOneOrMoreRule($object, $values, $related_records, $related_class, $route);
             if ($message) {
                 $validation_messages[fORM::tablize($related_class)] = $message;
             }
         }
     }
     $related_messages = fORMRelated::validate($class, $values, $related_records);
     $validation_messages = array_merge($validation_messages, $related_messages);
     return $validation_messages;
 }