class Fluent::Counter::ArrayValidator

def validate_key!(name)

def validate_key!(name)
  unless name.is_a?(String)
    raise Fluent::Counter::InvalidParams.new('The type of `key` should be String')
  end
  unless VALID_NAME =~ name
    raise Fluent::Counter::InvalidParams.new('`key` is the invalid format')
  end
end

def validate_scope!(name)

def validate_scope!(name)
  unless name.is_a?(String)
    raise Fluent::Counter::InvalidParams.new('The type of `scope` should be String')
  end
  unless VALID_SCOPE_NAME =~ name
    raise Fluent::Counter::InvalidParams.new('`scope` is the invalid format')
  end
end