Throw on missing required fields when encoding