private FormValidation validateNumericThreshold()

in src/main/java/com/amazon/inspector/jenkins/amazoninspectorbuildstep/AmazonInspectorBuilder.java [612:626]


        private FormValidation validateNumericThreshold(String value, String fieldName) {
            Jenkins.get().checkPermission(Job.CONFIGURE);
            if (value == null || value.trim().isEmpty()) {
                return FormValidation.error(fieldName + " threshold cannot be empty.");
            }
            try {
                int intValue = Integer.parseInt(value);
                if (intValue < 0) {
                    return FormValidation.error(fieldName + " threshold must be a non-negative integer.");
                }
            } catch (NumberFormatException e) {
                return FormValidation.error(fieldName + " threshold must be a numeric value.");
            }
            return FormValidation.ok();
        }