Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsInstanceOf

  • IsInstanceOf(target: any, validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks if the property is an instance of the target argument.

    Example

    class IsInstanceOfDemo {
    @IsInstanceOf(Date)
    e:Date= new Date()
    }

    Parameters

    • target: any

      The target constructor that the value is being checked against.

    • 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 isInstanceOf} 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 isInstanceOf}

Generated using TypeDoc