anchor.diff:          $formGroup.addClass("has-success");
         });
   
  +      // Check enum
  +      $("input[data-type='bool'], input[data-type='enum']").on("change", function() {
  +        var $el = $(this);
  +        var $formGroup = $el.closest(".form-group");
  +        // Get other options
  +        var $options = $formGroup.find(":checkbox");
  +
  +        $el.removeClass("form-control-success form-control-error");
  +        $formGroup.removeClass("has-success has-error");
  +        // Check at least one option checked
  +        var numChecked = 0;
  +        for (var i = 0; i < $options.length; i++) {
  +          if ($($options[i]).prop("checked")) {
  +            numChecked++;
  +          }
  +        }
  +        if (numChecked === 0) {
  +          $el.addClass("form-control-error");
  +          $formGroup.addClass("has-error");
  +          return;
  +        }
  +
  +        $el.addClass("form-control-success");
  +        $formGroup.addClass("has-success");
  +      });
  +
  +      // Check string
         $("input[data-type='string']").on("change", function() {
           var $el = $(this);
           var $formGroup = $el.closest(".form-group");
  
positive.code:     var schema = !{JSON.stringify(project.schema)};
  
      $(function() {
        $("[data-opt]").on("change", function() {
          // Elements
          var $el = $(this);
  
negative.code:         // Process form
          var formObj = {};
          // Loop over form simply (does not work on nested data)
          $("#new-optimisation").find("[id]:input, :checkbox").not(":submit").each(function(ind, el) {
            var $el = $(el);
            var $formGroup = $el.closest(".form-group");
            var name = $el.attr("name");
            var val = $el.val();
            var type = $formGroup.data("type");
  
            var vals = [];
            // Get existing vals for enums
            if (formObj[name]) {
              vals = formObj[name];
            }
            // Get all elements
            val.split(",").forEach(function(a) {
              if (type === "int" || type === "float") {
                a = parseFloat(a);
              } else if (type === "bool") {
                a = (a === "true");
              }
              // Push checkbox if checked
              if (!((type === "bool" || type === "enum") && !$el.prop("checked"))) {
                vals.push(a);
              }
            });
            formObj[name] = vals; // Set key and value
          });
  