title: Check if the value of textboxt exists in Typeahead
body: <p>I have this line of codes that will get all of the location in my database when user type in my textbox. The problem is I want to validate when the user change the text in my textbox and doesnt exist in my typeahead?</p>
  
  <pre><code>var path = "{{ route('search.location') }}";
  
  $('input.typeahead').typeahead({
      source:  function (query, process) {
          return $.get(path, { query: query }, function (data) {
              return process(data);
          });
      }
  }).blur(function () {
      if(source.indexOf($(this).val()) === -1) 
          alert('Not exists');
  });
  </code></pre>
  
  <p>I've done some research using <code>.blur</code> function but i cant get it work? </p>
  
  <pre><code>ReferenceError: source is not defined
  </code></pre>