set maxlength on search when maximumInputLength is defined. closes #538