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

How to autofill the last character of a mask and be a specific letter #27

Closed
techarch opened this issue May 25, 2021 · 2 comments
Closed

Comments

@techarch
Copy link

We are trying to define a mask that would allow inputs such as:
12-123456A
90-876543A
Where the first 2 characters are always digits.
The 3rd character would be autofilled to be a dash.
The 4th through the 9th characters would always be digits.
The 10th character would be autofilled to be an A.
We tried two alernative masks:

v-maska="##-######!A"

v-maska="{​​​mask:'##-######!A', tokens: {​​​'A': {​​​ pattern: /A/, uppercase: true }​​​ }​​​}​​​"

They both ensure that the input is valid, but does not autofill the 10th character automatically.
Is there a way to do that?

beholdr added a commit that referenced this issue May 28, 2021
@beholdr
Copy link
Owner

beholdr commented May 28, 2021

You're right. Should be fixed with 1.4.2

@beholdr beholdr closed this as completed May 28, 2021
@techarch
Copy link
Author

Thank you for the fix - the mask is working great now! :-)

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

2 participants