I wrote something similar for Ruby/Rails parameter validation. All of the solutions that were around at the time weren’t what I was looking for. It ends up looking like: https://gist.github.com/ezekg/f525a9d006c97cbcba231aa43e5ac9.... Is that something people would be interested in me open sourcing?