function process(value, callback) {
  var originalVal = value;
  return function (source) {
    var found = false;

    for (var s = 0, slen = source.length; s < slen; s++) {
      if (originalVal === source[s]) {
        found = true; // perfect match

        break;
      }
    }

    callback(found);
  };
}
Function responsible for validation of autocomplete value.

@param {*} value - Value of edited cell
@param {Function} callback - Callback called with validation result