adding validation to user generator