Skip to content

Can i do this kind of mask ?  #796

Open
@rafaelbuntu

Description

@rafaelbuntu

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
        }
      }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions