def validate_min_items(value, minimum, **kwargs):
    """
    Validator for ARRAY types to enforce a minimum number of items allowed for
    the ARRAY to be valid.
    """
    if len(value) < minimum:
        raise ValidationError(
            MESSAGES['min_items']['invalid'].format(
                minimum, len(value),
            ),
        )
Validator for ARRAY types to enforce a minimum number of items allowed for
    the ARRAY to be valid.