I am currently building payment system and I wonder if there is a way of defining dynamic schema depending on values of other params.
Ideally I’d be looking for sth like:
schema do required(:adapter).filled(:string).filled? do |value| required(:params).schema(adapter_schemas[value]) end end
Just starting with dry-validate, so sorry if I miss anything obvious.