nicolaiarocci/cerberus — pull request #2 by martijnvermaat (2012-12-12 21:41:24+00:00)
Title: Schema rule on lists

I'm not entirely happy about this patch, but thought I'd just send it to you.

The problem it solves is being able to define one schema that applies to all values in a list. For example, you can use it to define a list with only integer values (length undefined).

A special case of this, where the list values are dicts, is already covered by the ``items`` (dict) rule. But this one is more generic.

Actually, I think ``items`` would be a better name for this ``schema`` rule on lists, and as such, I would rather see the ``items`` (dict) rule replaced by this one. However, this would break backwards compatibility.