Hey,
I’m interested in your opinion. If validation-contracts are needed in a Hanami 2 app. Is it safe to create contracts like
module PaymentSlice
module Contracts
class PaymentContract < Dry::Validation::Contract
schema do
required(:amount).value(:integer)
# ...
end
end
end
end
or is it better to use include Hanami::Validations like
module PaymentSlice
module Contracts
class PaymentContract
include Hanami::Validations
validations do
required(:amount).value(:integer)
# ...
end
end
end
end
Thanks and best regards