dy-validation 1.0.
I have the following contract:
class DeviceContract < Dry::Validation::Contract
def initialize
super
end
params do
required(:screen_size).filled(:int?)
required(:keyboard).filled(:str?)
end
end
However, the above contract does not return an error when params other than screen_size
and keyboard
are provided.
What is the recommended way to whitelist with schema of type params
or json
using contracts?