Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

IsArrayNotIn

  • IsArrayNotIn(target: any[], validationOptions?: ValidationOptions): (object: any, propertyName: string) => void
  • Decorator that checks if the array value is not in array of allowed values.

    Example

    class IsArrayNotInDemo {
    @IsArrayIn([1,2,3])
    p0: any[] = [1,2,4]
    }

    Parameters

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

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

        • object: any
        • propertyName: string

        Returns void

validateValue

  • Check whether the value is not in the target array

    Parameters

    • vc: ValidationContext

      The validation context.

    • o: any

      The object containing the property to validate.

    Returns boolean

    True if the value is not in the target array.

Generated using TypeDoc