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

    // Ensure the map contains (at least) 'foo' and 'bar'.
    @MapContains(['foo', 'bar'])
    values: Map<number, string>

    Type Parameters

    • Value = unknown

      The type of values to check for.

    Parameters

    • required: Iterable<Value, any, any>

      The values required in the given map.

    • Optionaloptions: ValidationOptions

      Generic class-validator options.

    Returns PropertyDecorator