const zipCode = value => {
  const regex = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
  return regex.test(value);
};

const locationBasedZipCode = value => {
  console.log("value = ", value);
  if (value === "Using your location") return true;
  const regex = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
  return regex.test(value);
};

export { zipCode, locationBasedZipCode };

const zipCode = value => {
  const regex = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
  return regex.test(value);
};

const locationBasedZipCode = value => {
  if (value === "Using your location" || value === "") return true;
  const regex = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
  return regex.test(value);
};

export { zipCode, locationBasedZipCode };

fix zip code validation so that it doesn't think an empty string is a bad zip code