Allow validators to specify result code for exported data, closes #1356