code: function(event, ui) {
            if (preventDuplicates) {
              var content = ui.content;
              var filtered = [];
              // Compatible with `removed` and `propagate`
              var values = self.get({ valuesOnly: true });
              $.each(content, function(i, datum) {
                if ($.inArray(datum.value.toString(), values) !== -1) {
                  return;
                }
                filtered.push(datum);
              });
  
              // "Why don't you just assign to ui.content?" jquery.ui.autocomplete
              // is holding a reference to the original array. If I assign to ui.content
              // I'm not changing that original array and jquery.ui.autocomplete ignores me.
              content.length = 0;
              $.each(filtered, function(i, datum) {
                content.push(datum);
              });
            }
  
            // In case self.get is called with 'incomplete'
            if (!add) {
              incompleteValidation = $.map(ui.content, function(datum) {
                return datum.value.toString();
              });
            }
  
          }
docs: Stomp out suggestions of choices already made