src/Factories/Factory.php
public function createRelationshipDocumentValidator($document)
    {
        return new Validation\Spec\RelationValidator(
            $this->container->make(StoreInterface::class),
            $this->createErrorTranslator(),
            $document
        );
    }
public function createRelationshipDocumentValidator($document)
    {
        return new Validation\Spec\RelationValidator(
            $this->container->make(StoreInterface::class),
            $this->createErrorTranslator(),
            $document
        );
    }
Create a validator to check that a relationship document complies with the JSON API specification.

@param object $document
@return DocumentValidatorInterface