Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jquery tokeninput - Regex as a token #1

Open
siavashfdst opened this issue Nov 14, 2015 · 0 comments
Open

Jquery tokeninput - Regex as a token #1

siavashfdst opened this issue Nov 14, 2015 · 0 comments

Comments

@siavashfdst
Copy link

Hi
I want to have a regex expression like ^([-+/]\d+(.\d+)?) for mathematical expressions as well as some texts for operands in my token lists in loopj jquery tokeninput. like this:

$(document).ready(function() {
        $("#demo-input-local").tokenInput([
            {id: 7, name: "salary"},
            {id: 11, name: "interest_rate"},
    {id: 51,  name: /^([-+/*]\d+(\.\d+)?)*/  },
        ], {
            theme: "facebook"
        });
    });

but, ^([-+/]\d+(.\d+)?) regex inside tokeninput doesn't work and this error occurs:

  Uncaught TypeError: row[$(...).data(...).propertyToSearch].toLowerCase is not a function

Can you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant