Skip to content

Ngx-mask with special character "+" not autofilling in v18.0.4 #1498

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

Open
KingDarBoja opened this issue Feb 7, 2025 · 0 comments
Open

Ngx-mask with special character "+" not autofilling in v18.0.4 #1498

KingDarBoja opened this issue Feb 7, 2025 · 0 comments

Comments

@KingDarBoja
Copy link

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: ngx-mask v16.4.2 (and older)

Description

There are two issues with the ngx-mask versions 18 & 19.

  1. The mask does not autofill after typing numbers or characters when there is a special character at the beginning.
    It used to autofill in previous version (at least 16.4.2 and older).

Example:
Mask -> +(000) 00000099999
Typing a number should autofill the first special character "+", but it doesn't work as before and now I have to manually type the "+" sign to use the inpput field.


  1. The mask does not validate when there is a "-" special character in a mask as @A*-A*, it only takes into account the first 4 characters or more after the first asterisk but doesn't require the "-" and therefore the input can be submitted incomplete.

Example:
Mask -> @A*-A*

  • @te-abc should be valid.
  • @taaaa should be invalid but it is marked as valid nowadays and the "-" sign isn't required.

🔬 Minimal Reproduction

I have made two stackblitz to showcase how the first issue (autofill with "+") works with v14.3.3 and how the second issue has been buggy in all versions since 14.

You can change the version at the stackblitz with ngx-mask v18 to see how the first issue still works with v16.4.2 but not v17, v8 or even v19 of this library.

🌍 Your Environment

Angular Version: v18 for the sake of these examples.

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

1 participant