import dayjs from "dayjs"; export const checkPassportDate = (value: string) => { if (!value || value === "") return true; const errMessage = "Pasaport bitiş tarihi hatalı. Lütfen geçerli bir tarih girin."; const isAfterToday = dayjs( value.split(".").reverse().join("-"), "YYYY-MM-DD", ).isAfter(dayjs()); if (!isAfterToday) { return errMessage; } return true; };