1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

What is the way to TextMask multiple phone numbers as input in angular [closed]

Discussão em 'Angular' iniciado por Jaswinder Singh, Outubro 8, 2024.

  1. I want Angular Text mask for Multiple Phone Numbers; For Example - 888-989-8653;986-741-6985;893-562-7412 ---- so on. For one number validation I have added following expression:

    TypeScript
    public phoneMask = [/\d/, /\d/, /\d/, '-',/\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/];

    HTML
    <input *ngIf="column?.type =='phone'" type="text" [textMask]="{mask: phoneMask}" [(ngModel)]="phoneModel">


    So this give me the TextMask like this ___-___-____ My requirement is repeated this mask for multiple phone numbers like this

    888-989-8653;___-___-___
    888-989-8653;986-741-6985;___-___-___
    888-989-8653;986-741-6985;893-___-___
    888-989-8653;986-741-6985;893-562-7412;___-___-___


    What could be the suggested way for this

    Continue reading...

Compartilhe esta Página