Skip to content
New issue

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

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

Already on GitHub? # to your account

Can i do this kind of mask ? #796

Open
rafaelbuntu opened this issue Nov 18, 2022 · 0 comments
Open

Can i do this kind of mask ? #796

rafaelbuntu opened this issue Nov 18, 2022 · 0 comments

Comments

@rafaelbuntu
Copy link

rafaelbuntu commented Nov 18, 2022

I have a search field to search in my list and i have a resource to find two numbers or more like:

productID: 2274124 [or] 2274123 [or] 1284552

I found this great plugin and iam trying to use the number mask to the search field and i cant make this works.
The search must match only numbers and the brackets [ with any word inside ] see my failed test

$('#my-search-field').mask("X", {
    translation: {
        'X': {
            pattern: /([0-9])|(\[.*?\])/g,
            optional: true,
            recursive: true
        }
      }
});
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant