Hashidator!

I have been using MongoDB a lot recently, often using nothing but the low-level Ruby driver, and needed a way to validate input before passing it on to MongoDB. I give you: Hashidator. Example:

It can validate arrays and nested hashes and knows about duck typing and booleans as well. For full coverage consult the example.

Available on Gemcutter.