add validation method to controller for a set of names