src/Validators/AbstractRelationshipValidator.php
protected function validateHasMany(
        RelationshipInterface $relationship,
        $record = null,
        $key = null,
        ResourceObjectInterface $resource = null
    ) {
        if (!$relationship->isHasMany()) {
            $this->addError($this->errorFactory->relationshipHasManyExpected($key));
            return false;
        }

        $identifiers = $relationship->getIdentifiers();

        if (!$this->validateIdentifiers($identifiers, $record, $key, $resource)) {
            return false;
        }

        return true;
    }
protected function validateHasMany(
        RelationshipInterface $relationship,
        $record = null,
        $key = null,
        ResourceObjectInterface $resource = null
    ) {
        if (!$relationship->isHasMany()) {
            $this->addError($this->errorFactory->relationshipHasManyExpected($key));
            return false;
        }

        $identifiers = $relationship->getIdentifiers();

        if (!$this->validateIdentifiers($identifiers, $record, $key, $resource)) {
            return false;
        }

        return true;
    }
Is this a valid has-many relationship?

@param RelationshipInterface $relationship
@param null $record
@param null $key
@param ResourceObjectInterface|null $resource
@return bool