• Checks if the given value is a Map and contains all required keys.

    Example

    // Ensure the map contains (at least) the keys 13 and 42.
    @MapContainsKeys([13, 42])
    values: Map<number, string>

    Type Parameters

    • Key = unknown

      The type of keys to check for.

    Parameters

    • required: Key[]

      The keys required in the given map.

    • Optional options: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator