minDate
Binds a validator to the given path that requires the value to be greater than or equal to
the given minDate.
This function can only be called on date paths.
In addition to binding a validator, this function adds MIN property to the field.
API
function minDate<
TValue extends Date | null,
TPathKind extends PathKind = PathKind.Root,
>(
path: SchemaPath<TValue, 1, TPathKind>,
minDateValue: Date | LogicFn<TValue, Date | undefined, TPathKind>,
config?: BaseValidatorConfig<TValue, TPathKind> | undefined,
): void;Date | LogicFn<TValue, Date | undefined, TPathKind>The minimum date, or a LogicFn that returns the minimum date.
BaseValidatorConfig<TValue, TPathKind> | undefinedOptional, allows providing any of the following options:
error: Custom validation error(s) to be used instead of the defaultminDateError()or a function that receives theFieldContextand returns custom validation error(s).
voidDescription
Binds a validator to the given path that requires the value to be greater than or equal to
the given minDate.
This function can only be called on date paths.
In addition to binding a validator, this function adds MIN property to the field.
When the field is bound to an <input type="date">, its value is a Date at midnight UTC, so the
minimum should be built the same way, e.g. new Date('2026-06-01') or
new Date(Date.UTC(2026, 5, 1)). A Date created from local time, such as new Date(2026, 5, 1)
or new Date(), is offset by the user's time zone, which can make the limit date itself invalid.