public function validate(
        InboundRequestInterface $inboundRequest,
        StoreInterface $store,
        ValidatorProviderInterface $resource,
        ValidatorProviderInterface $related = null
    ) {
        /** Check the JSON API query parameters */
        if (!$inboundRequest->getRelationshipName()) {
            $this->checkQueryParameters($inboundRequest, $resource);
        } elseif ($related) {
            $this->checkQueryParameters($inboundRequest, $related);
        }

        $identifier = $inboundRequest->getResourceIdentifier();
        $record = $identifier ? $store->findOrFail($identifier) : null;

        /** Check the JSON API document is acceptable */
        $this->checkDocumentIsAcceptable($inboundRequest, $resource, $record);
    }