ukhas/habitat — pull request #304 by danielrichman (2013-03-26 00:35:32+00:00)
Title: Fix issue #302 - _validate_formats stopping early

the 'try' and 'for' loops in _validate_format used to be in the wrong order, so the first key that didn't have an entry in 'properties' caused checking of the whole object to stop:

```python
try:
for key, value in data.items():
_validate_formats(value, schema['properties'][key])
```

The try is there to catch KeyError if schema['properties'][key] does not exist. If this happens (KeyError thrown) on the first key tested no further keys are tested.