codegangsta/martini-contrib — pull request #58 by egravert (2013-12-13 16:40:59+00:00)
Title: Added nested required fields support

Modified the binding.Validate to recurse into required fields that are
structs.

given the Scenario:
User struct {
Name string `json:"name" required`
Home Address `json:"address" required`
}

Address struct {
Street1 string `json:"street1" required`
Street2 string `json:"street2"`
}

I would expect Validation to fail unless street1 is specified.
However, the existing validation only checked using DeepEquals, which
looks for overall differences between the zero value and the actual.

To resolve the issue, Validate now checks the Kind of each required
field, and recurses into the value if it is a struct.