import { z } from "zod"

export const nullableStringValidator = z
  .string()
  .nullish()
  .transform((str) => (str ? str : ""))

export const nullableStringEmailValidator = z
  .string()
  .email()
  .nullish()
  .transform((str) => (str ? str : ""))

export const nullableStringUrlValidator = z
  .string()
  .url()
  .nullish()
  .transform((str) => (str ? str : ""))
