Apply nested schema to all values of a hash

:wave: , thanks for your answer, it helped a lot :slight_smile:

I finally got this working:

rule(:paths) do
  value.each do |(key, value)|
    PathSchema.call(value).errors.each do |error|
      key([:paths, *error.path]).failure(error.text)
    end
  end
end
1 Like