docs: public static FormValidation validateIntegerInRange(String value, int lower, int upper) {
          try {
              int intValue = Integer.parseInt(value);
              if (intValue < lower) {
                  return error(hudson.model.Messages.Hudson_MustBeAtLeast(lower));
              }
              if (intValue > upper) {
                  return error(hudson.model.Messages.Hudson_MustBeAtMost(upper));
              }
              return ok();
          } catch (NumberFormatException e) {
              return error(hudson.model.Messages.Hudson_NotANumber());
          }
      }