code: function(data) {
          if (data === null) {
              return [];
          } else if (Array.isArray(data)) {
              return data.map(this.validateItem, this);
          } else {
              throw new Error('Data for MultiSelectivity instance should be an array');
          }
      }
docs: Validates data to set. Throws an exception if the data is invalid.
  
  @param data The data to validate. Should be an array of objects with 'id' and 'text'
  properties.
  
  @return The validated data. This may differ from the input data.