VAT registration number

EXPERIMENTAL
This is currently experimental because more research is needed.

This component lets the user enter a VAT registration number. Do not call it ‘VAT number’ or ‘VAT identification number’.

When to use

Use this pattern when the user must enter a VAT registration number to use a service.

If there is a good reason for asking for a VAT registration number but the user does not have to enter one, make it optional.

When not to use

If there is no good reason for asking for a VAT registration number and the user does not have to enter one to use the service, do not ask for one.

How it works

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

This is 9 numbers, sometimes with ‘GB’ at the start, for example 123456789 or GB123456789. You can find it on Anycompany’s VAT registration certificate.

<form>
  <div class="form-group">
    <h1 class="heading-xlarge">
      <label for="vat-registration-number">
        What is Anycompany’s VAT registration number?
      </label>
    </h1>
    <p>
      This is 9 numbers, sometimes with ‘GB’ at the start, for example 123456789 or GB123456789. You can find it on Anycompany’s VAT registration certificate.
    </p>
    <input class="form-control form-control-1-4" id="vat-registration-number" name="vat-registration-number" type="text">
  </div>
  <button type="submit" class="button" role="button">
    Continue
  </button>
</form>

Or you can ask for the VAT registration number as a normal form label, separate from the <h1>.

<div class="form-group">
  <label for="vat-registration-number">
    <span class="form-label">
      VAT registration number
    </span>
    <span class="form-hint">
      This is 9 numbers, sometimes with ‘GB’ at the start, for example 123456789 or GB123456789. You can find it on your VAT registration certificate.
    </span>
  </label>
  <input class="form-control form-control-1-3" id="vat-registration-number" name="vat-registration-number" type="text">
</div>

Use a single text input and allow the user to enter 9 numbers with or without spaces or ‘GB’ at the start. Remove the spaces and the ‘GB’ before validating.

Provide help

Always provide help in the form label, normal content or hint text that is as clear as possible. This may include:

  • a short explanation of what a VAT registration number is
  • where the user can find it
  • what it looks like
  • an example – if you show an example, always use ‘123456789’

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

Do not use the details component to hide any help. Research shows users may:

  • not know what a VAT registration number is
  • need help to know what a VAT registration number looks like

If it is the company the user works for, use ‘your VAT registration number’. If it is not the company the user works for, use the company's name, for example ‘Anycompany’s VAT registration number’.

Error messages

Error messages should be styled like this:

<div class="form-group form-group-error">
  <label for="vat-registration-number">
    <span class="form-label">
      VAT registration number
    </span>
    <span class="form-hint">
      This is 9 numbers, sometimes with ‘GB’ at the start, for example 123456789 or GB123456789. You can find it on your VAT registration certificate.
    </span>
    <span id="vat-registration-number-error" class="error-message">
      Enter your VAT registration number
    </span>
  </label>
  <input class="form-control form-control-1-3" id="vat-registration-number" name="vat-registration-number" type="text">
</div>

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 VAT registration number is empty

Say ‘Enter [whatever it is]’.
For example, ‘Enter your VAT registration number’.

If the VAT registration number is in the wrong format

Say ‘Enter [whatever it is] in the correct format’.
For example, ‘Enter your VAT registration number in the correct format’.

Research

Research has shown that users often expect this kind of information to be pre-populated, especially when they have signed in. Research has also shown users need help to know:

  • what their VAT registration number looks like
  • where they can find their VAT registration number

We need more research. If you’ve used this pattern, get in touch to share your user research findings.

Discuss VAT registration number on GitHub

Help and support

Contact the Service Design Tools team in #team-sdt on HMRC Slack (open in app) or email us.