UNPKG

class-validator-extended

Version:
21 lines (20 loc) 677 B
import type { ValidationOptions } from 'class-validator'; /** @hidden */ export declare const FUTURE_DATE = "futureDate"; /** * Checks if the given value is a Date object in the future. * * Beware that the behaviour of this check depends on the current time and can thus be difficult to test. In particular, * as time goes by the property can become invalid without ever changing its value. * * #### Example * ```typescript * // Ensure the value is in the future. * @FutureDay() * scheduledFor: Date * ``` * * @category Date * @param options Generic class-validator options. */ export declare function FutureDate(options?: ValidationOptions): PropertyDecorator;