@Override
    public List<ErrorMessage> validate(JsonNode jsonDocument) {
        List<ErrorMessage> results = new ArrayList<>();
        if (!isAcceptableType(jsonDocument)) {
            return singleError("", "Invalid type: must be an array");
        }
        if ((maxItems != 0) && (jsonDocument.size() > maxItems)) {
            return singleError("", "Current array size of %d is greater than allowed maximum array size of %d", jsonDocument.size(), maxItems);
        }

        if ((minItems != 0) && (jsonDocument.size() < minItems)) {
            return singleError("", "Current array size of %d is less than allowed minimum array size of %d", jsonDocument.size(), minItems);
        }

        int index = 0;
        for(JsonNode item : jsonDocument) {
            results.addAll(generateNestedErrorMessages(index++, items.validate(item)));
        }
        return results;
    }