ngx-mask
ngx-mask copied to clipboard
Backspace automatically delete special characters
I feel like, given the popularity of this repo, this is already implemented. Maybe I am blind.
Anyway, is there a way to make it so backspace automatically deletes special characters? For example, it is annoying to have to delete spaces and parenthesis in a phone number mask mask="(000) 000-0000"
is this issue fixed? i am also facing this issue
I have found an easy fix for this issue, you can use the dynamic valid mask to delete the special characters.
Eg: Your phone number input is mask="(000) 000-0000", as you use backspace the special characters should get deleted automatically. You can simply convert your mask to mask="(000) 000-0000||(000) 000||(000|| "
This is simplest approach to this problem I have figured (make sure to validate your phone number length etc. during submission)
@andrewgazelka @velu-dev Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-58eyev?file=src%2Fmain.ts