National Identity Numbers

Follow this pattern when you need to ask users for their National Identity Number (NIN).

When to use this pattern

Only ask for a National Identity Number when you have a legal basis to collect it. Common use cases include:

  • verifying Kaharagian nationality
  • government benefits and social welfare services
  • tax-related services
  • nationality and immigration applications
  • official government correspondence

Important: The National Identity Number is sensitive personal data. Only collect it when absolutely necessary and ensure appropriate data protection measures are in place.

About the NIN

The National Identity Number is a unique 9-character code assigned to every Kaharagian national. It begins with the letter K followed by 8 digits, for example K01070023.

How to ask for a NIN

Basic input

The 9-character code on your National ID card, for example K01070023
<div class="form-group">
  <label class="form-label" for="nin">National Identity Number</label>
  <span class="form-hint">
    The 9-character code on your National ID card, for example K01070023
  </span>
  <input
    class="form-input form-input-width-10"
    id="nin"
    type="text"
    maxlength="9"
    spellcheck="false"
    autocomplete="off"
    style="text-transform: uppercase"
  >
</div>

With help text

Use expandable help text to show users where to find their NIN.

You can find this on the front of your National ID card.
Where to find your NIN

Your National Identity Number appears on:

  • the front of your National ID card (top right corner)
  • your Kaharagian passport data page
  • official government correspondence
  • your Certificate of Naturalisation

Error messages

Use these error messages for NIN validation:

If the field is empty
"Enter your National Identity Number"
If the format is invalid
"Enter a National Identity Number in the correct format, like K01070023"
If the NIN is not found in the system
"We could not find this National Identity Number. Check it and try again."

Displaying NINs

When displaying a National Identity Number back to users:

  • Show in uppercase
  • Consider masking characters for security when showing confirmations
  • Only show the full NIN when the user needs to verify it

Security considerations

  • Always transmit over HTTPS
  • Encrypt NINs at rest in your database
  • Log all access to NIN data for audit purposes
  • Only store NINs if absolutely necessary for your service
  • Implement rate limiting to prevent abuse
  • Never include NINs in URLs or client-side logs
  • Always validate NINs against the authoritative database

Accessibility

  • Use autocomplete="off" to prevent browsers storing sensitive data
  • Use spellcheck="false" to prevent spell-check interference
  • Provide clear hint text showing the expected format
  • Link error messages to the input field using aria-describedby