Autocomplete - check if manual or selected?

Autocomplete - check if manual or selected?

Hello,

I'm new to javascript and was hoping someone would be able to help me out.
I'm using the jQuery UI Autocomplete but have ran into a problem.

 I would like to know if the user manually enters a name without selecting from the autosuggest list.
If this happens I would then display a bit of text 'user not selected from list'.


How would I go about doing this?


My code:
  1.     $(function() {
  2.             $('#userID').val("");           
  3.             $('#userName').val("");
  4.             $('#name').val("");
  5.             $('#email').val("");           
  6.             $('#contactNumber').val("");           
  7.        
  8.             $("#name").autocomplete({
  9.                 source: "users.php",
  10.                 minLength: 2,
  11.                 select: function(event, ui) {
  12.                    
  13.                 $('#userID').val(ui.item.userID);
  14.                 $('#name').val(ui.item.name);
  15.                 $('#userName').val(ui.item.userName);
  16.                 $('#email').val(ui.item.email);
  17.                 $('#contactNumber').val(ui.item.contactNumber);           
  18.                        
  19.                 }   
  20.             });   
  21.         });