Is it possible to access option out of validate block?


#1

Is it possible to access option out of validate block?
For example:

schema = Dry::Validation.Schema do
  configure do
    option :zoom
  end

  required(:message).maybe
  options[:zoom].each do |z|
    validate(element: []) do
      z.blank?
    end
  end
end

schema.with(zoom: [1,2,3]).call(message: "blah")

zoom is a dynamic array.