Use structured errors during validation
Merge pull request #343 from thockin/valid2

Use structured errors during validation