ngx-mask
ngx-mask copied to clipboard
ClearIfNotMatch does not work with a custom placeHolderCharacter
Description
clearIfNotMatch does not clear invalid input if showMaskTyped=true and placeHolderCharacter is set to a different character than an underscore. This issue is an extension of the problem seen in https://github.com/JsDaddy/ngx-mask/issues/304
🔬 Minimal Reproduction
Example shows two inputs, one with a custom placeholder, one without. The input with a custom placeholder does not clear properly if not a match. https://stackblitz.com/edit/angular-ivy-mask-hzqt3s
Possible Cause
https://github.com/JsDaddy/ngx-mask/blob/feab974e488365484807b237e9816d114e0f8374/projects/ngx-mask-lib/src/lib/mask.service.ts#L220 It appears like this code assumes that the placeholder character is the default placeholder.