These are chat archives for dry-rb/chat

7th
Nov 2016
Steve
@dnd
Nov 07 2016 15:56
I'm trying to validate an object that has an array of hashes where I want the sum of values from one of the hash keys to match a key from the main object. {total: 123, items: [{amount: 22}, {amount: 193}]} What complicates this is that I was thinking of defining the validation on items, but that means that if there are validation issues with some of the other content in the items hashes that the errors returned may sometimes be an array of error strings, other times an array of error hashes