Skip to main content
Back

EORI numbers

This pattern is used to check or ask for a user’s EORI number.

Check the content style guide for how to write about EORI numbers.

When to use

Use this pattern when the user must enter an EORI number to use a service.

If there is a good reason to ask for an EORI number, but the user does not have to enter one, make it optional.

When not to use

If there is no good reason to ask for an EORI number and the user does not have to enter one to use the service, do not ask for one.

How it works

Checking an EORI number

Include the EORI number in the question so the information is available upfront to all users.

              <div class="govuk-form-group">
  <fieldset class="govuk-fieldset" aria-describedby="want-to-register-hint">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Is the EORI number you want to register GB123456123456?
      </h1>
    </legend>
    <div id="want-to-register-hint" class="govuk-hint">
      This is the EORI number that is registered to your Government Gateway ID.
    </div>
    <div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="want-to-register" name="want-to-register" type="radio" value="yes">
        <label class="govuk-label govuk-radios__label" for="want-to-register">
          Yes
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="want-to-register-2" name="want-to-register" type="radio" value="no">
        <label class="govuk-label govuk-radios__label" for="want-to-register-2">
          No
        </label>
      </div>
    </div>
  </fieldset>
</div>

<button type="submit" class="govuk-button" data-module="govuk-button">
  Continue
</button>
            
                <div class="govuk-form-group">
  <fieldset class="govuk-fieldset" aria-describedby="want-to-register-hint">
    <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
      <h1 class="govuk-fieldset__heading">
        Ai dyma’r rhif EORI rydych chi am ei gofrestru: GB123456123456?
      </h1>
    </legend>
    <div id="want-to-register-hint" class="govuk-hint">
      Dyma’r rhif EORI sydd wedi’i gofrestru i’ch cyfrif ID Porth y Llywodraeth.
    </div>
    <div class="govuk-radios govuk-radios--inline" data-module="govuk-radios">
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="want-to-register" name="want-to-register" type="radio" value="yes">
        <label class="govuk-label govuk-radios__label" for="want-to-register">
          Iawn
        </label>
      </div>
      <div class="govuk-radios__item">
        <input class="govuk-radios__input" id="want-to-register-2" name="want-to-register" type="radio" value="no">
        <label class="govuk-label govuk-radios__label" for="want-to-register-2">
          Na
        </label>
      </div>
    </div>
  </fieldset>
</div>

<button type="submit" class="govuk-button" data-module="govuk-button">
  Yn eich blaen
</button>
              
                {% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukRadios({
  classes: "govuk-radios--inline",
  idPrefix: "want-to-register",
  name: "want-to-register",
  hint: {
    text: "This is the EORI number that is registered to your Government Gateway ID."
  },
  fieldset: {
    legend: {
      text: "Is the EORI number you want to register GB123456123456?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "yes",
      text: "Yes"
    },
    {
      value: "no",
      text: "No"
    }
  ]
}) }}

{{ govukButton({
  text: "Continue"
}) }}
              
                  {% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukRadios({
  classes: "govuk-radios--inline",
  idPrefix: "want-to-register",
  name: "want-to-register",
  hint: {
    text: "Dyma’r rhif EORI sydd wedi’i gofrestru i’ch cyfrif ID Porth y Llywodraeth."
  },
  fieldset: {
    legend: {
      text: "Ai dyma’r rhif EORI rydych chi am ei gofrestru: GB123456123456?",
      isPageHeading: true,
      classes: "govuk-fieldset__legend--l"
    }
  },
  items: [
    {
      value: "yes",
      text: "Iawn"
    },
    {
      value: "no",
      text: "Na"
    }
  ]
}) }}

{{ govukButton({
  text: "Yn eich blaen"
}) }}
                

Asking for an EORI number

You can ask for the EORI number as the main heading or <h1> of the screen. It may be a question or statement.

              <div class="govuk-form-group">
  <h1 class="govuk-label-wrapper">
    <label class="govuk-label govuk-label--l" for="eori-number">
      What is your EORI number?
    </label>
  </h1>
  <div id="eori-number-hint" class="govuk-hint">
    The first 2 letters are the country code, like GB or XI. This is followed by 12 or 15 digits, like GB123456123456.
  </div>
  <input class="govuk-input govuk-input--width-20" id="eori-number" name="eori-number" type="text" aria-describedby="eori-number-hint">
</div>

<button type="submit" class="govuk-button" data-module="govuk-button">
  Continue
</button>
            
                <div class="govuk-form-group">
  <h1 class="govuk-label-wrapper">
    <label class="govuk-label govuk-label--l" for="eori-number">
      Beth yw’ch rhif EORI?
    </label>
  </h1>
  <div id="eori-number-hint" class="govuk-hint">
    Cod y wlad yw’r 2 lythyren gyntaf, megis GB neu XI. Dilynir hyn gan 12 neu 15 digid, megis GB123456123456.
  </div>
  <input class="govuk-input govuk-input--width-20" id="eori-number" name="eori-number" type="text" aria-describedby="eori-number-hint">
</div>

<button type="submit" class="govuk-button" data-module="govuk-button">
  Yn eich blaen
</button>
              
                {% from "govuk/components/input/macro.njk" import govukInput %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukInput({
  classes: "govuk-input--width-20",
  label: {
    text: "What is your EORI number?",
    classes: "govuk-label--l",
    isPageHeading: true
  },
  hint: {
    text: "The first 2 letters are the country code, like GB or XI. This is followed by 12 or 15 digits, like GB123456123456."
  },
  id: "eori-number",
  name: "eori-number"
}) }}

{{ govukButton({
  text: "Continue"
}) }}
              
                  {% from "govuk/components/input/macro.njk" import govukInput %}
{% from "govuk/components/button/macro.njk" import govukButton %}

{{ govukInput({
  classes: "govuk-input--width-20",
  label: {
    text: "Beth yw’ch rhif EORI?",
    classes: "govuk-label--l",
    isPageHeading: true
  },
  hint: {
    text: "Cod y wlad yw’r 2 lythyren gyntaf, megis GB neu XI. Dilynir hyn gan 12 neu 15 digid, megis GB123456123456."
  },
  id: "eori-number",
  name: "eori-number"
}) }}

{{ govukButton({
  text: "Yn eich blaen"
}) }}
                

Use a single text input and allow the user to enter the EORI type (for example, ‘GB’ or ‘XI’) and numbers. This can be with or without spaces, and using uppercase or lowercase letters. You should ignore any unwanted characters.

EORI numbers starting with:

  • GB or XI are 14 characters long, for example GB123456123456
  • EU country codes are 3-17 characters long, for example FR12345671234567

Validating an EORI number

If you’re validating an EORI number at the end of a service, use the confirmation pages pattern. Otherwise, take the user to the next question.

              <div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <div class="govuk-panel govuk-panel--confirmation">
      <h1 class="govuk-panel__title">
        Valid
      </h1>
      <div class="govuk-panel__body">
        EORI number<br><strong>GB123456123456</strong>
      </div>
    </div>

    <h2 class="govuk-heading-m">EORI registration details</h2>

    <h3 class="govuk-heading-s">Registered business name</h3>

    <p class="govuk-body">ABC Ltd</p>

    <h3 class="govuk-heading-s">Registered business address</h3>

    <p class="govuk-body">
      ABC House<br>
      ABC Street<br>
      London<br>
      SE1 1AB<br>
      United Kingdom<br>
    </p>

    <p class="govuk-body">Search completed on 10 January 2022 at 5:30pm (GMT).</p>

    <p class="govuk-body"><a href="#" class="govuk-link">Check another EORI number</a></p>

    <p class="govuk-body"><a href="#" class="govuk-link">What did you think of this service?</a> (takes 30 seconds)</p>
  </div>
</div>
            
                <div class="govuk-grid-row">
  <div class="govuk-grid-column-two-thirds">
    <div class="govuk-panel govuk-panel--confirmation">
      <h1 class="govuk-panel__title">
        Dilys
      </h1>
      <div class="govuk-panel__body">
        Rhif EORI<br><strong>GB123456123456</strong>
      </div>
    </div>

    <h2 class="govuk-heading-m">Manylion cofrestru EORI</h2>

    <h3 class="govuk-heading-s">Enw’r busnes cofrestredig</h3>

    <p class="govuk-body">ABC Ltd</p>

    <h3 class="govuk-heading-s">Cyfeiriad y busnes cofrestredig</h3>

    <p class="govuk-body">
      ABC House<br>
      ABC Street<br>
      London<br>
      SE1 1AB<br>
      United Kingdom<br>
    </p>

    <p class="govuk-body">Cwblhawyd y chwiliad ar 10 Ionawr 2022 am 17:30 (GMT).</p>

    <p class="govuk-body"><a href="#" class="govuk-link">Gwirio rhif EORI arall</a></p>

    <p class="govuk-body"><a href="#" class="govuk-link">Beth oedd eich barn am y gwasanaeth hwn?</a> (mae’n cymryd 30 eiliad)</p>
  </div>
</div>
              
                {% set mainClasses = "govuk-main-wrapper--l" %}

{% from "govuk/components/panel/macro.njk" import govukPanel %}

  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
      {{ govukPanel({
        titleText: "Valid",
        html: "EORI number<br><strong>GB123456123456</strong>"
      }) }}

      <h2 class="govuk-heading-m">EORI registration details</h2>

      <h3 class="govuk-heading-s">Registered business name</h3>

      <p class="govuk-body">ABC Ltd</p>

      <h3 class="govuk-heading-s">Registered business address</h3>

      <p class="govuk-body">
      ABC House<br>
      ABC Street<br>
      London<br>
      SE1 1AB<br>
      United Kingdom<br>
      </p>

      <p class="govuk-body">Search completed on 10 January 2022 at 5:30pm (GMT).</p>

      <p class="govuk-body"><a href="#" class="govuk-link">Check another EORI number</a></p>

      <p class="govuk-body"><a href="#" class="govuk-link">What did you think of this service?</a> (takes 30 seconds)</p>
    </div>
  </div>
              
                  {% set mainClasses = "govuk-main-wrapper--l" %}

{% from "govuk/components/panel/macro.njk" import govukPanel %}

  <div class="govuk-grid-row">
    <div class="govuk-grid-column-two-thirds">
      {{ govukPanel({
        titleText: "Dilys",
        html: "Rhif EORI<br><strong>GB123456123456</strong>"
      }) }}

      <h2 class="govuk-heading-m">Manylion cofrestru EORI</h2>

      <h3 class="govuk-heading-s">Enw’r busnes cofrestredig</h3>

      <p class="govuk-body">ABC Ltd</p>

      <h3 class="govuk-heading-s">Cyfeiriad y busnes cofrestredig</h3>

      <p class="govuk-body">
      ABC House<br>
      ABC Street<br>
      London<br>
      SE1 1AB<br>
      United Kingdom<br>
      </p>

      <p class="govuk-body">Cwblhawyd y chwiliad ar 10 Ionawr 2022 am 17:30 (GMT).</p>

      <p class="govuk-body"><a href="#" class="govuk-link">Gwirio rhif EORI arall</a></p>

      <p class="govuk-body"><a href="#" class="govuk-link">Beth oedd eich barn am y gwasanaeth hwn?</a> (mae’n cymryd 30 eiliad)</p>
    </div>
  </div>
                

If an EORI number is not valid, do not use the confirmation page pattern.

              <h1 class="govuk-heading-xl">Your EORI number did not match any registered business</h1>

<p class="govuk-body">You searched for ‘<strong>GB123456123456</strong>’.</p>

<p class="govuk-body">Search completed on 10 January 2022 at 5:30pm (GMT).</p>

<p class="govuk-body"><a href="#" class="govuk-link">Check another EORI number</a></p>

<p class="govuk-body"><a href="#" class="govuk-link">What did you think of this service?</a> (takes 30 seconds)</p>
            
                <h1 class="govuk-heading-xl">Nid oedd eich rhif EORI yn cyfateb i unrhyw fusnes cofrestredig</h1>

<p class="govuk-body">Gwnaethoch chwilio am '<strong>GB123456123456</strong>'.</p>

<p class="govuk-body">Cwblhawyd y chwiliad ar 10 Ionawr 2022 am 17:30 (GMT).</p>

<p class="govuk-body"><a href="#" class="govuk-link">Gwirio rhif EORI arall</a></p>

<p class="govuk-body"><a href="#" class="govuk-link">Beth oedd eich barn am y gwasanaeth hwn?</a> (mae’n cymryd 30 eiliad)</p>
              
                <h1 class="govuk-heading-xl">Your EORI number did not match any registered business</h1>

<p class="govuk-body">You searched for ‘<strong>GB123456123456</strong>’.</p>

<p class="govuk-body">Search completed on 10 January 2022 at 5:30pm (GMT).</p>

<p class="govuk-body"><a href="#" class="govuk-link">Check another EORI number</a></p>

<p class="govuk-body"><a href="#" class="govuk-link">What did you think of this service?</a> (takes 30 seconds)</p>
              
                  <h1 class="govuk-heading-xl">Nid oedd eich rhif EORI yn cyfateb i unrhyw fusnes cofrestredig</h1>

<p class="govuk-body">Gwnaethoch chwilio am '<strong>GB123456123456</strong>'.</p>

<p class="govuk-body">Cwblhawyd y chwiliad ar 10 Ionawr 2022 am 17:30 (GMT).</p>

<p class="govuk-body"><a href="#" class="govuk-link">Gwirio rhif EORI arall</a></p>

<p class="govuk-body"><a href="#" class="govuk-link">Beth oedd eich barn am y gwasanaeth hwn?</a> (mae’n cymryd 30 eiliad)</p>
                

Provide help

When asking for an EORI number always provide help in the form label, normal content or hint text that is as clear as possible. Show an example using the format ‘GB123456123456’.

Help may also include:

  • a short explanation of what an EORI number is
  • where the user can find it
  • what it looks like

You can use an image that shows where it is on documents and letters.

Only use the details component to show a list of EU country codes. Do not use it to hide any other help, as users may:

  • not know what an EORI number is
  • need help to know what an EORI number looks like

Error messages

Make sure errors follow the guidance about error messages in the GOV.UK Design System and have specific error messages for specific error states.

If the field is empty

Say ‘Enter your EORI number’.

              <div class="govuk-error-summary" data-module="govuk-error-summary">
  <div role="alert">
    <h2 class="govuk-error-summary__title">
      There is a problem
    </h2>
    <div class="govuk-error-summary__body">
      <ul class="govuk-list govuk-error-summary__list">
        <li>
          <a href="#eori-number">Enter your EORI number</a>
        </li>
      </ul>
    </div>
  </div>
</div>

<div class="govuk-form-group govuk-form-group--error">
  <h1 class="govuk-label-wrapper">
    <label class="govuk-label govuk-label--l" for="eori-number">
      What is your EORI number?
    </label>
  </h1>
  <div id="eori-number-hint" class="govuk-hint">
    The first 2 letters are the country code, like GB or XI. This is followed by 12 or 15 digits, like GB123456123456.
  </div>
  <p id="eori-number-error" class="govuk-error-message">
    <span class="govuk-visually-hidden">Error:</span> Enter your EORI number
  </p>
  <input class="govuk-input govuk-input--error" id="eori-number" name="eori-number" type="text" aria-describedby="eori-number-hint eori-number-error">
</div>
            
                <div class="govuk-error-summary" data-module="govuk-error-summary">
  <div role="alert">
    <h2 class="govuk-error-summary__title">
      Mae problem wedi codi
    </h2>
    <div class="govuk-error-summary__body">
      <ul class="govuk-list govuk-error-summary__list">
        <li>
          <a href="#eori-number">Nodwch eich rhif EORI</a>
        </li>
      </ul>
    </div>
  </div>
</div>

<div class="govuk-form-group govuk-form-group--error">
  <h1 class="govuk-label-wrapper">
    <label class="govuk-label govuk-label--l" for="eori-number">
      Beth yw’ch rhif EORI?
    </label>
  </h1>
  <div id="eori-number-hint" class="govuk-hint">
    Cod y wlad yw’r 2 lythyren gyntaf, megis GB neu XI. Dilynir hyn gan 12 neu 15 digid, megis GB123456123456.
  </div>
  <p id="eori-number-error" class="govuk-error-message">
    <span class="govuk-visually-hidden">Error:</span> Nodwch eich rhif EORI
  </p>
  <input class="govuk-input govuk-input--error" id="eori-number" name="eori-number" type="text" aria-describedby="eori-number-hint eori-number-error">
</div>
              
                {% from "govuk/components/input/macro.njk" import govukInput %}
{% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %}

{{ govukErrorSummary({
  titleText: "There is a problem",
  errorList: [
    {
      text: "Enter your EORI number",
      href: "#eori-number"
    }
  ]
}) }}

{{ govukInput({
  label: {
    text: "What is your EORI number?",
    classes: "govuk-label--l",
    isPageHeading: true
  },
  hint: {
    text: "The first 2 letters are the country code, like GB or XI. This is followed by 12 or 15 digits, like GB123456123456."
  },
  id: "eori-number",
  name: "eori-number",
  errorMessage: {
    text: "Enter your EORI number"
  }
}) }}
              
                  {% from "govuk/components/input/macro.njk" import govukInput %}
{% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %}

{{ govukErrorSummary({
  titleText: "Mae problem wedi codi",
  errorList: [
    {
      text: "Nodwch eich rhif EORI",
      href: "#eori-number"
    }
  ]
}) }}

{{ govukInput({
  label: {
    text: "Beth yw’ch rhif EORI?",
    classes: "govuk-label--l",
    isPageHeading: true
  },
  hint: {
    text: "Cod y wlad yw’r 2 lythyren gyntaf, megis GB neu XI. Dilynir hyn gan 12 neu 15 digid, megis GB123456123456."
  },
  id: "eori-number",
  name: "eori-number",
  errorMessage: {
    text: "Nodwch eich rhif EORI"
  }
}) }}
                

If the country code is wrong

Say what the country code should be. For example: ‘Country code can only be XI or an EU country code’.

If there are too many or too few characters

Say ‘EORI number is too long’ or ‘EORI number is not long enough’.

Research

We need more research. If you have used the EORI number pattern, get in touch to share your research findings.

Discuss the EORI number pattern on GitHub