Using frm.fields_dict['items'].grid.update_docfield_property('rack','reqd', 1) to solve the problem.
frm.fields_dict['items'].grid.update_docfield_property('rack','reqd', 1)
Found the solution in this answer