UNPKG

class-validator-extended

Version:
20 lines (19 loc) 562 B
import type { ValidationOptions } from 'class-validator'; /** @hidden */ export declare const PAST_DATE = "pastDate"; /** * Checks if the given value is a Date object in the past. * * Beware that the behaviour of this check depends on the current time and can thus be difficult to test. * * #### Example * ```typescript * // Ensure the value is in the past. * @PastDate() * created: Date * ``` * * @category Date * @param options Generic class-validator options. */ export declare function PastDate(options?: ValidationOptions): PropertyDecorator;