probil / v-mask

🔡 Tiny input mask library for Vue.js (directive)

Home Page:https://v-mask-demo.netlify.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optional placeholder doesn't enforce following placeholder character

killroyboy opened this issue · comments

V-Mask and Vue versions

"latest" (2.2.4), 2.5.2

Reproduction Link

https://codesandbox.io/s/v-mask-demo-forked-vbthi

Steps to reproduce

  1. Create a mask that includes the optional character followed by either a custom or standard placeholder
  2. Attempt to enter a value that does not include the expected value for the given placeholder and it is allowed.
  3. See "Optional Uppercase" and "Optional Digit" inputs in codesandbox link for details

What is Expected?

The mask ?#?# should allow only 1 or 2 digits.

What is actually happening?

The mask ?#?# allows 1 or 2 of any character