minil minil - 1 month ago 11x
jQuery Question

minLength in jquery autocomplete multiple values plugin

I am using jquery autocomplete pluguin. Configured to use multiple Values.

I set option minLength : 2

minLength option is working only for first autosuggest words, for multiple values its not working.

How do i configure or which method i need to override to fix this issue.


The multiple remote demo on the jQuery UI website demonstrates this behavior. You just need to add a custom search function:

    search: function() {
        // custom minLength
        var term = extractLast( this.value );
        if ( term.length < 2 ) {
            return false;