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

Alternator mask issue #2827

Closed
MadMat1 opened this issue Oct 31, 2024 · 1 comment
Closed

Alternator mask issue #2827

MadMat1 opened this issue Oct 31, 2024 · 1 comment

Comments

@MadMat1
Copy link

MadMat1 commented Oct 31, 2024

I have a problem trying to use two masks together with the alternator operator.
They work fine on their own but there are odd behaviours when joining.

I'll try to explain using this jsfiddle.

The first two masks works as they should, but in the third if you do this then the characters won't erase as they does in the first mask field:

  • Type "12345678A"
  • Move cursor to the position where number 6 is.
  • Hit backspace several times.

Am I using the alternator operator in the wrong way?
Thanks in advance.

@RobinHerbots
Copy link
Owner

Replace the alternator with this

var im = new Inputmask(["9{7,8}-A", "(x|y|z|X|Y|Z)-9{6,7}-A"]);

or

var im = new Inputmask("(9{7,8}-A)|((x|y|z|X|Y|Z)-9{6,7}-A)");

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