ngx-mask
ngx-mask copied to clipboard
usa zipcode and placeholder
Hi @NepipenkoIgor. I need add usa zip code too. And now when I add
<input formControlName="zipCode" mask="00000-0?0?0?0?" [showMaskTyped]="true" />
I see this

So, why doesn't work this mask? And I have problem with placeholder. Now it is ____, I want for zip: XXXXX-YYYY Can you help me? Thank you)
Originally posted by @redka in https://github.com/JsDaddy/ngx-mask/issues/63#issuecomment-548540389
I've found a solution to this. You can use the following configuration for the mask: pattern='^[0-9]{5}(?:[0-9]{4})?$' mask="00000-0000" [validation]="false" [showMaskTyped]="true"
@redka Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-vq47a6?file=src%2Fmain.ts