/** * {% inheritdoc %} */ public function validate(DocumentInterface $document) { foreach ($document->getProperties() as $property => $typeOptions) { $isValid = $this->validateOneProperty($document, $property, $typeOptions); } return (bool) (!(count($this->getErrors()) > 0)); }