Adding validation for a text attribute for objects in the substitute_answer helper function