show error when invalid format is passed