import { z } from "zod";

export const dateRangeValidator = z.tuple([
	z.date({
		required_error: "Date is required",
		invalid_type_error: "Must be a valid date"
	}),
	z.date({
		required_error: "Date is required",
		invalid_type_error: "Must be a valid date"
	})
]).refine(
	(dates) => dates.length === 2,
	{
		message: "Must be exactly 2 dates"
	}
);
