public function validate($subject): bool
    {
        if (\is_array($this->schema['properties'])) {
            foreach ($this->schema['properties'] as $propertyName => $propertySchema) {
                if (isset($subject[$propertyName])) {
                    $nodeValidator = new NodeValidator($propertySchema, $this->rootSchema);
                    if (!$nodeValidator->validate($subject[$propertyName])) {
                        return false;
                    }
                }
            }
        }
        return true;
    }