Access to additional attributes

Hello :wave:

I noticed that when we create contracts with dry-validation, any additional parameters are sliced-out, e.g.:

class MyContract < Dry::Validation::Contract
  params do
    required(:var).value(:integer)
  end
end

params = { var: 4, foo: "bar" }
MyContract.new.call(params).to_h
# => { var: 4 }

Is there a way to get access to the parameters that were sliced out (i.e. additional attributes)?

I noticed this when migrating an application from Hanami 1 to Hanami 2 - on Hanami 1 (which used dry-validations 0.11), additional parameters were not sliced

No. If you have a param that is allowed, just allow it.