private void validateLength(JsonNode node, List<ErrorMessage> results) {
        if (minLength > 0) {
            String value = type.getValue(node).toString();
            if (value.length() < minLength) {
                results.add(new ErrorMessage("", "Value '" + node.textValue() + "' must be greater or equal to " + minLength + " characters"));
            }
        }
        if (maxLength > 0) {
            String value = type.getValue(node).toString();
            if (value.length() > maxLength) {
                results.add(new ErrorMessage("", String.format("Value '%s' must be less or equal to %d characters", node.textValue(), maxLength)));
            }
        }
    }