Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsAfterInstant

  • IsAfterInstant(target: string | Date, validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks if the property is after the target constraint instant argument.

    Example

    class IsAfterInstantDemo {
    @IsAfterInstant(new Date(0))
    after: Date = new Date(1);
    }

    class IsAfterInstantReferenceDemo {
    before: Date = new Date(0);

    @IsAfterInstant('before')
    after: Date = new Date(1);
    }

    Parameters

    • target: string | Date

      Either a Date instance or the name of the property containing the date used in the comparison.

    • Optional validationOptions: ValidationOptions

      The validation options

    Returns (object: any, propertyName: string) => void

      • (object: any, propertyName: string): void
      • Parameters

        • object: any
        • propertyName: string

        Returns void

validateValue

Generated using TypeDoc