How to make short piece of jquery validate?

How to make short piece of jquery validate?

I am using the following jquery plugin:

http://plugins.jquery.com/project/autocompletex

Besides the link to the relevant JS I have this piece of code in my page <head> </head> section:

<script type="text/javascript">
$().ready(function() {

   function findValueCallback(event, data, formatted) {
      $("<li>").html( !data ? "No match!" : "Selected: " + formatted).appendTo("#result");
   }
   
   function formatItem(row) {
      return row[0] + " (<strong>id: " + row[1] + "</strong>)";
   }
   function formatResult(row) {
      return row[0].replace(/(<.+?>)/gi, '');
   }
   
   $("#state2").autocomplete(topics);


});

</script>


However, because there is an <li> in there - the page won't validate at http://validator.w3.org/

Anyone know how to fix this?