Baggz/Amanda — pull request #29 by schloerke (2012-03-02 02:08:37+00:00)
Title: Required Objects

These changes should allow objects to fit a certain mold while being flexible.

Example Schema:
```javascript
var schema = {
type: 'object',
properties: {
user: {
type: 'object',
properties: {
name: {
required: true
},
surname: {
required: true
} } } } };
```

It doesn't require anything, but if it is there, it should be an object.
If it has a field of 'user', it should be an object.
If field 'user' exists, then 'name' and 'surname' are required to be present.

Currently, the 'user' field is not taken into account when looking at it's required subfields: 'name' and 'surname'. If 'user' is not present and not required, then I believe there is no need to check for it's sub fields.

Best,
Barret