code: @Override
      public boolean isValid(T value) {
          int length = 0;
          if (value instanceof Map<?, ?>) {
              length = ((Map<?, ?>) value).size();
          } else if (value instanceof Collection<?>) {
              length = ((Collection<?>) value).size();
          } else if (value instanceof Object[]) {
              length = ((Object[]) value).length;
          } else if (value != null) {
              length = value.toString().length();
          }
          return length >= minValue && length <= maxValue;
      }
docs: {@inheritDoc}