Schema validator for error objects