ngx-mask
ngx-mask copied to clipboard
Mask with or (||) does not work.
π bug report
Is this a regression?
I'm not sure, but i think in version 14 will it work like a charmDescription
I have a masking for initials. The initials should be separated by a dot and can contain one to 5 letters. The problem comes with an update of ng-mask. in a earlier version i didnt have problems with this mask. now the "or" (||) masks will not be evaluated. actually i use "ngx-mask": "~15.2.3" with Angular 15.
With Version "ngx-mask": "~15.0.2" the Mask will work perfectly, but if i backspace, i have to set the cursor before the Character. In Version 15.2.3 the mask does not fit, but the backspace works without problems. and i version 14 both works without problems.
π¬ Minimal Reproduction
<input
mask="S.||S.S.||S.S.S.||S.S.S.S.||S.S.S.S.S."
type="text"
[dropSpecialCharacters]="false"
[validation]="false">
https://stackblitz.com/edit/angular-ivy-5agzc8?file=src%2Fapp%2Fapp.component.ts Version 14 will work
π₯ Exception or Error
I does not get an Exception or Error. It's not possible to put more than one character. If i change the past to:
"S.S.S.S.S." the last dot appears only if i put five characters into the field.
π Your Environment
Angular Version:
Angular CLI: 15.2.10
Node: 16.20.2
Package Manager: npm 8.19.4
OS: win32 x64
Angular: 15.2.10
... animations, cli, common, compiler, compiler-cli, core
... elements, forms, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1502.10
@angular-devkit/build-angular 15.2.10
@angular-devkit/core 15.2.10
@angular-devkit/schematics 15.2.10
@angular/cdk 15.2.9
@angular/material 15.2.9
@nguniversal/builders 15.2.1
@nguniversal/express-engine 15.1.0
@schematics/angular 15.2.10
rxjs 7.5.7
typescript 4.8.4
"ngx-mask": "~15.2.3",
Anything else relevant?