Keep prefix even if dropSpecialCharacters is true with ngx-mask

1.5k views Asked by At
<input matInput prefix="+55" mask=" (00) 00000-0000" [dropSpecialCharacters]="true" type="text" formControlName="phone" name="phone">

With this code I'm already getting a value masked as +55 (11) 12345-6789, and in the form a value like 11123456789, but I need to keep the prefix on value like +5511123456789. Is it possible?

1

There are 1 answers

0
Tim Njagi On

Not sure if there's a way to do that but you can just re-add the prefix in your submit function.