I am using the zod library to validate my react forms. I am using this schema.
import * as zod from "zod";
export const appointmentSchema = zod.object({
title: zod.string().nonempty("Please enter a title"),
description: zod.string(),
scheduledDate: zod.date()
});
export type appointmentFormData = zod.infer<typeof appointmentSchema>;
Is there a way to add validation to datetime to throw an error if datetime submitted is greater than date.now?