Italian fiscal code validation/control - Angular

Discussão em 'Angular' iniciado por Sophia, Janeiro 29, 2025.

  1. Sophia

    Sophia Guest

    Could someone tell me how to check fiscal code (at least for name and surname) in Angular?

    EXAMPLE -->

    name: Lorenzo

    lastname: Rossi

    How do I check that I have correctly entered the consonants of the name and lastname in the fiscal code?

    fiscal code: RSSLRN87A14L219U. At least RSSLRN is right?

    Unfortunately I don't have a reactive form. This is my HTML.

    <div class="col-4">
    <div>Codice fiscale</div>
    <span class="p-float-label">
    <input type="text" pInputText placeholder="Inserisci codice fiscale"
    name="codiceFiscale"
    [(ngModel)]="data.fiscalCode"
    pattern="^([A-Za-z]{6}[0-9lmnpqrstuvLMNPQRSTUV]{2}
    [abcdehlmprstABCDEHLMPRST]{1}[0-9lmnpqrstuvLMNPQRSTUV]{2}[A-Za-z]{1}[0-
    9lmnpqrstuvLMNPQRSTUV]{3}[A-Za-z]{1})$|([0-9]{11})$"
    onKeyPress="if(this.value.length==16) return false;"/>
    </span>
    </div>


    Thanks in advance!!

    Continue reading...

Compartilhe esta Página