Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsBeforeInstant

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

    Example

    class IsBeforeInstantDemoA {
    @IsBeforeInstant(new Date(1))
    before: Date = new Date(0)
    }

    class IsBeforeInstantDemoB {
    @IsBeforeInstant('after')
    before: Date = new Date(0)

    after: Date = new Date(1)
    }

    Parameters

    • target: string | Date
    • Optional validationOptions: ValidationOptions

      The validation options

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

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

        • object: any
        • propertyName: string

        Returns void

validateArray

validateValue

  • Value is valid if it passes the {@link isBeforeInstant} check.

    Parameters

    • vc: ValidationContext

      The validation context.

    • o: any

      The object containing the property to validate.

    Returns boolean

    The result of the call to {@link isBeforeInstant}

Generated using TypeDoc