How to use external depency methods in validations?

Using external dependencies that represent objects, how can you use the methods on that object in a validation?

Simple example

Dry::Validation.Schema do
  configure do
    option :record
  end

  required(:id, :int).filled(eql?: record.id)
end

# Throws Error: NoMethodError (undefined method `id' for #<UnboundMethod:0x007fce52b82c70>)

This should work:

Dry::Validation.Schema do
  configure do
    config.type_specs = true
  end

  required(:id, :int).filled(:int?)

  validate(valid_record_id: %i[id]) do |id|
    id.equal?(record.id)
  end
end

This is a new feature in 0.10.0.