Changes to enable validation for objects generated by InputFormatters.

UnitTests + FunctionalTests for the same.
Could you move this to the bottom along with the other inner type definitions?