docs: public static boolean validateOptionalField(String field, String reg) {
          if (field == null || field.isEmpty()) {
              return true;
          }
          return Pattern.matches(reg, field);
      }