Add back else statements to update error message if name isn't valid.