sanitizeField(field, instanceIndex) {
    let sanitizedField = Object.assign({}, field)
    if (instanceIndex) {
      sanitizedField.id = field.id && `${field.id}-${instanceIndex}`
      sanitizedField.name = field.name && `${field.name}-${instanceIndex}`
    }
    sanitizedField.className = Array.isArray(field.className)
      ? utils.unique(field.className.join(' ').split(' ')).join(' ')
      : field.className || field.class || null
    delete sanitizedField.class
    if (field.values) {
      sanitizedField.values = field.values.map(option => utils.trimObj(option))
    }
    sanitizedField = utils.trimObj(sanitizedField)
    if (Array.isArray(field.userData) && field.userData.length === 0) {
      sanitizedField.userData = [] //Special handler for allowing userData to be empty
    }
    return sanitizedField
  }
Clean up passed object configuration to prepare for use with the markup function
@param {Object} field - object of field configuration
@param {number} [instanceIndex] - instance index
@return {Object} sanitized field object