code: public static boolean isValidIp(@NotNull final String ipStr) {
          return ipPattern.matcher(StringUtils.strip(ipStr)).matches();
      }
docs: Given an ip string, it checks if it's a valid ip with a regex (see ipPattern attribute)
  
  @param ipStr the string to check if it's a valid ip
  @return true if it's a valid ip, false otherwise