code: protected function resourceRelationships($record = null)
      {
          $validator = $this->validatorFactory()->relationships();
          $this->relationshipRules($validator, $record);
  
          return $validator;
      }
docs: Get a validator for the resource relationships member.
  .
  
  @param object|null $record
  the record being updated, or null if it is a create request.
  @return RelationshipsValidatorInterface