Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Underscores ("_") break all masking #527

Open
maxshuty opened this issue Aug 17, 2021 · 2 comments
Open

Underscores ("_") break all masking #527

maxshuty opened this issue Aug 17, 2021 · 2 comments
Labels

Comments

@maxshuty
Copy link

V-Mask and Vue versions

1.3.1, 2.5

Reproduction Link

Here is a fiddle of the bug

Steps to reproduce

  1. Use an _ underscore in the mask, for example: ##_##-###

What is Expected?

Underscores should work

What is actually happening?

Masking no longer works at all

@l2cri
Copy link

l2cri commented Sep 10, 2021

all regxp functon like return ['https://', 'example.com', '/', /[a-zA-Z0-9_]/] return
TypeError: Cannot read properties of undefined (reading 'test')] if in value isset Underscores

@probil
Copy link
Owner

probil commented Sep 27, 2021

@l2cri As specified in the documentation you should provide array of regular expressions per character. The library wasn't intended to be used for such complex cases like url conforming. Use pattern attribute of the <input/> instead

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

No branches or pull requests

3 participants