diff --git a/src/controls.js b/src/controls.js index cde682f..87ee12b 100644 --- a/src/controls.js +++ b/src/controls.js @@ -300,7 +300,8 @@ Autocompleter.Base = Class.create({ onObserverEvent: function() { this.changed = false; this.tokenBounds = null; - if(this.getToken().length>=this.options.minChars) { + this.options.regexp ? send=this.options.regexp.match(this.getToken()) : send=true; + if(send && this.getToken().length>=this.options.minChars) { this.getUpdatedChoices(); } else { this.active = false;