private static void validateStringPatternProperty(
            StringPattern stringPattern,
            Object value,
            Field field,
            List<String> errorMessages) {
        if (!(value instanceof String str)) {
            throw new IllegalArgumentException(
                    "The value of the field ("
                            + ClassUtil.getReference(field)
                            + ") must be a string for string pattern validation");
        }
        switch (stringPattern) {
            case NUMERIC -> {
                if (!StringUtil.allCharsInSet(str, NUMERIC_CHAR_SET)) {
                    String message = "The property \""
                            + field.getName()
                            + "\" has an invalid string pattern \""
                            + str
                            + "\". Expected a numeric string";
                    errorMessages.add(message);
                }
            }
            case ALPHABETIC -> {
                if (!StringUtil.allCharsInSet(str, ALPHABETIC_CHAR_SET)) {
                    String message = "The property \""
                            + field.getName()
                            + "\" has an invalid string pattern \""
                            + str
                            + "\". Expected an alphabetic string";
                    errorMessages.add(message);
                }
            }
            case ALPHANUMERIC -> {
                if (!StringUtil.allCharsInSet(str, ALPHANUMERIC_CHAR_SET)) {
                    String message = "The property \""
                            + field.getName()
                            + "\" has an invalid string pattern \""
                            + str
                            + "\". Expected an alphanumeric string";
                    errorMessages.add(message);
                }
            }
        }
    }
@implNote We don't use "hibernate-validator" because it has a terrible performance
turms-server-common/src/main/java/im/turms/server/common/infra/property/TurmsPropertiesValidator.java