tdegrunt/jsonschema — pull request #5 by coryvirok (2012-09-27 20:59:33+00:00)
Title: Missing objects are not causing errors

```javascript
var assert = require('assert');
var Validator = require('./lib/validator');

var schema = {
required: true,
type: 'object',
properties: {
foo: {
type: 'object',
required: true
}
}
};

var validator = new Validator();
var errors = validator.validate({}, schema);
assert(errors.length);
```

The pull request adds in a check in validateObject() which checks to see if it's required before exiting the function. If it is and the instance is not defined, an error will be added.