import { z } from "zod"

export const nullableNumberValidator = z
  .number()
  .nullish()
  .transform((num) => (typeof num === "number" ? num : 0))

export const nullableIntValidator = z
  .number()
  .int()
  .nullish()
  .transform((num) => (typeof num === "number" ? num : 0))
