You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: post_validator.rb
    path of file: ./repos/diaspora/lib/archive_validator
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class ArchiveValidator
  class PostValidator < BaseValidator
   
    
    def validate
      return unless entity_type == "reshare" && entity_data["root_guid"].nil?

      messages.push("reshare #{self} doesn't have a root, ignored")
    end

    attr_reader :json
  end