ngx-mask
ngx-mask copied to clipboard
Bug Optional 9* problem
"ngx-mask": "8.1.7", "ngx-mask": "9.0.2",
I am trying a mask="9*/0* but not working.
i want this case /2020 , 1234/2000, 1234568/202020 ... optional-many/required-many
I also tried mask="999999/0*" and this is not working too .
Am i doing anything wrong ?
I may be having the same problem - trying to have a mask that takes 1234-1234 or 12345-1234 so I used the mask 90000-0000. Not only does it not work, but when I input a number into the keypad, I'm getting some really strange behavior (like a number is inserted randomly into the input control)
@RoboZoom @AngularAlb Same problem here.
I managed to circunvent this using a dynamic mask: mask="(00) 0000-0000||(00) 00000-0000" instead of using 9 for optional digits.
I still experience this issue. Example of real world cases:
- czech street number: 99990/990L
- czech account number: 999999-9999999000/0000
- or simple example: 9000/0000
- this one won't accept this input "123/0100"
Basically any mask with optional number before a special character seems to create problems.
The proposed workaround with logical OR in mask didn't work for me. It always take the shorter variant.
Tested with ngx-mask version 13.1.15
@kotelnik Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-5xv6md?file=src%2Fmain.ts
@AngularAlb @RoboZoom @ivanmonteiro Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected- https://stackblitz.com/edit/angular-xx58pe?file=src%2Fmain.ts