Open mimhof1 opened 11 years ago
Hi,
that is not available currently. Min chars, max chars and double entries are prevented, but nothing further than that.
If you mean, please make a PR. It's welcome.
Hi Jan...I'm going to go after it then using beforeRequest in the meantime. Would you suggest that to be the best entry point? WHat I'll do is take the query and check if tab, enter, or comma was the last key, then if so, run the regex filter and if pass, return query and if not, clear and return empty. Sound feasible?
On Fri, Oct 18, 2013 at 3:25 PM, Jan Philipp notifications@github.comwrote:
Hi,
that is not available currently. Min chars, max chars and double entries are prevented, but nothing further than that.
If you mean, please make a PR. It's welcome.
— Reply to this email directly or view it on GitHubhttps://github.com/hlsolutions/jquery-autosuggest/issues/29#issuecomment-26622901 .
FYI, not sure if I sent that PR to the right place.
On Fri, Oct 18, 2013 at 3:55 PM, marc imhof marcimhof@gmail.com wrote:
Hi Jan...I'm going to go after it then using beforeRequest in the meantime. Would you suggest that to be the best entry point? WHat I'll do is take the query and check if tab, enter, or comma was the last key, then if so, run the regex filter and if pass, return query and if not, clear and return empty. Sound feasible?
On Fri, Oct 18, 2013 at 3:25 PM, Jan Philipp notifications@github.comwrote:
Hi,
that is not available currently. Min chars, max chars and double entries are prevented, but nothing further than that.
If you mean, please make a PR. It's welcome.
— Reply to this email directly or view it on GitHubhttps://github.com/hlsolutions/jquery-autosuggest/issues/29#issuecomment-26622901 .
Hm. I don't think so.
Hi Jan, I was able to create a workaround using the callback afterSelectionAdd instead of beforeRequest. Basically, it takes "item", check that key I want to filter( item.email), and if it fails, forces an immediate $("input[name="test).autoSuggest('remove',item.email); Essentially, the item got added to the list, then we checked it, and because it failed, turned around and removed it. It's fast enough for what we need to do because the data in the list isn't being used until a separate function is called elsewhere. Thanks again for taking this plugin to a new level...and thanks for the quick responses. BTW I found your version after chasing down issues in the first one and saw your link to yours. Thanks for taking the time to do that.
On Fri, Oct 18, 2013 at 6:52 PM, Jan Philipp notifications@github.comwrote:
Hm. I don't think so.
- Clone/Checkout this repository (hlsolutions/hquery-autosuggets)
- Make a branch
- Put all your commits into this and make a PR by visiting this page https://github.com/hlsolutions/jquery-autosuggest/pulls
— Reply to this email directly or view it on GitHubhttps://github.com/hlsolutions/jquery-autosuggest/issues/29#issuecomment-26635807 .
Greetings, I'm trying to locate the correct callback to filter a selection before allowing it to be added to the list. The basic idea is if the entered || comma-ed || tabbed || query is not a valid email ( using a regex here) then it clears the input box and prevents the add. I am about to hack beforeRequest but it seems to be fired with every keypress instead of hooking right before adding.