function formcheck_enrollment_code(this_DET) {
  var this_button_id = this_DET.id;

  var frmvalidator = new Validator("F1", this_button_id);

  var sn = document.getElementById("values[new][SHORT_NAME]").value;
  var t = document.getElementsByName("values[new][TYPE]")[0].value;

  if (sn.trim() != "" || t != "") {
    frmvalidator.addValidation(
      "values[new][TITLE]",
      "req",
      "Title cannot be blank"
    );
    frmvalidator.addValidation(
      "values[new][TITLE]",
      "alphanumeric",
      "Title allows only alphanumeric value"
    );
    frmvalidator.addValidation(
      "values[new][TITLE]",
      "maxlen=100",
      "Max length for title is 100 characters"
    );
  } else {
    frmvalidator.clearAllValidations();
  }

  var title = document.getElementsByName("values[new][TITLE]")[0].value;
  if (title != "" && sn == "") {
    frmvalidator.addValidation(
      "values[new][SHORT_NAME]",
      "req",
      "Short name cannot be blank"
    );
  }
  if (title != "" && t == "") {
    frmvalidator.addValidation(
      "values[new][TYPE]",
      "req",
      "Type cannot be blank"
    );
  }

  var ar_id = document.getElementById("id_arr").value;
  ar_id = ar_id.trim();
  if (ar_id != 0) {
    var ar_id = ar_id.split(",");
    for (var i = 0; i < ar_id.length; i++) {
      frmvalidator.addValidation(
        "values[" + ar_id[i] + "][TITLE]",
        "req",
        "Title cannot be blank"
      );
      frmvalidator.addValidation(
        "values[" + ar_id[i] + "][TITLE]",
        "alphanumeric",
        "Title allows only alphanumeric value"
      );
      frmvalidator.addValidation(
        "values[" + ar_id[i] + "][TITLE]",
        "maxlen=100",
        "Max length for title is 100 characters"
      );
      frmvalidator.addValidation(
        "values[" + ar_id[i] + "][SHORT_NAME]",
        "req",
        "Short name cannot be blank"
      );
      frmvalidator.addValidation(
        "values[" + ar_id[i] + "][TYPE]",
        "req",
        "Type cannot be blank"
      );
    }
  }
}
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.