Updated rules autocomplete js