tweaks to sample code (and add a comment about how there is only 1 error message per field)