public static boolean validateIPv6(String str) {
        if (str == null) {
            return false;
        }

        final int len = str.length();
        if (len < 2 || len > 39) {
            return false;
        }

        int start = 0;
        int colonCount = 0;
        for (int i = 0; i < len; i++) {
            char ch = str.charAt(i);
            if (ch == '.') {
                boolean ipV4 = validateIPv4(str, start);
                if (!ipV4) {
                    return false;
                }
                break;
            }
            if (ch == ':' || i == len - 1) {
                int end = ch == ':' ? i : i + 1;
                int n = end - start;

                char c0, c1, c2, c3;
                switch (n) {
                    case 0:
                        break;
                    case 1:
                        c0 = str.charAt(end - 1);
                        if (!(c0 >= '0' && c0 <= '9' || (c0 >= 'A' && c0 <= 'F') || (c0 >= 'a' && c0 <= 'f'))) {
                            return false;
                        }
                        break;
                    case 2:
                        c0 = str.charAt(end - 2);
                        c1 = str.charAt(end - 1);

                        if (!(c0 >= '0' && c0 <= '9' || (c0 >= 'A' && c0 <= 'F') || (c0 >= 'a' && c0 <= 'f'))) {
                            return false;
                        }
                        if (!(c1 >= '0' && c1 <= '9' || (c1 >= 'A' && c1 <= 'F') || (c1 >= 'a' && c1 <= 'f'))) {
                            return false;
                        }
                        break;
                    case 3:
                        c0 = str.charAt(end - 3);
                        c1 = str.charAt(end - 2);
                        c2 = str.charAt(end - 1);

                        if (!(c0 >= '0' && c0 <= '9' || (c0 >= 'A' && c0 <= 'F') || (c0 >= 'a' && c0 <= 'f'))) {
                            return false;
                        }
                        if (!(c1 >= '0' && c1 <= '9' || (c1 >= 'A' && c1 <= 'F') || (c1 >= 'a' && c1 <= 'f'))) {
                            return false;
                        }
                        if (!(c2 >= '0' && c2 <= '9' || (c2 >= 'A' && c2 <= 'F') || (c2 >= 'a' && c2 <= 'f'))) {
                            return false;
                        }
                        break;
                    case 4:
                        c0 = str.charAt(end - 4);
                        c1 = str.charAt(end - 3);
                        c2 = str.charAt(end - 2);
                        c3 = str.charAt(end - 1);

                        if (!(c0 >= '0' && c0 <= '9' || (c0 >= 'A' && c0 <= 'F') || (c0 >= 'a' && c0 <= 'f'))) {
                            return false;
                        }
                        if (!(c1 >= '0' && c1 <= '9' || (c1 >= 'A' && c1 <= 'F') || (c1 >= 'a' && c1 <= 'f'))) {
                            return false;
                        }
                        if (!(c2 >= '0' && c2 <= '9' || (c2 >= 'A' && c2 <= 'F') || (c2 >= 'a' && c2 <= 'f'))) {
                            return false;
                        }
                        if (!(c3 >= '0' && c3 <= '9' || (c3 >= 'A' && c3 <= 'F') || (c3 >= 'a' && c3 <= 'f'))) {
                            return false;
                        }
                        break;
                    default:
                        return false;
                }

                if (ch == ':') {
                    colonCount++;
                    start = i + 1;
                }
            }
        }

        return colonCount > 0 && colonCount < 8;
    }
decimal is integer, check has non-zero small

@param decimal
@return
core/src/main/java/com/alibaba/fastjson2/util/TypeUtils.java