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: cross_model_slug_validator.rb
    path of file: ./repos/forem/app/validators
    
    the code of the file until where you have to start completion: class CrossModelSlugValidator < ActiveModel::EachValidator
  FORMAT_REGEX = /\A[0-9a-z\-_]+\z/
  ORGANIZATION_FORMAT_REGEX = /\A(?![0-9]+\z)[0-9a-z\-_]+\z/
  ## allow / in page slugs
  PAGE_FORMAT_REGEX = /\
    
  def correct_format?(record, attribute, value)
    format_regex = case record.class.name
                   when "Organization"
                     ORGANIZATION_FORMAT_REGEX
                   when "Page"
                     PAGE_FORMAT_REGEX
                   else
                     FORMAT_REGEX
                   end