Displaying page
of
pages;
Items to
Title |
Test
Details
UK VAT validation
|
Expression |
^(GB)?(\ )?[0-9]\d{2}(\ )?[0-9]\d{3}(\ )?(0[0-9]|[1-8][0-9]|9[0-6])(\ )?([0-9]\d{2})?|(GB)?(\ )?GD(\ )?([0-4][0-9][0-9])|(GB)?(\ )?HA(\ )?([5-9][0-9][0-9])$
|
Description |
UK VAT Validation
Conforms to format outlined below:
Country code GB followed by either:
standard:
9 digits (block of 3, block of 4, block of 2 – e.g. GB999 9999 73)
branch traders:
12 digits (as for 9 digits, followed by a block of 3 digits)
government departments: the letters GD then 3 digits from 000 to 499 (e.g. GBGD001)
health authorities:
the letters HA then 3 digits from 500 to 999 (e.g. GBHA599)
For the 9-digit scheme, the 2-digit block containing the 8th and 9th digits is always in the range 00 to 96 and is derived from a weighted modulus-97 check number (an identical algorithm is used for the 12-digit scheme, ignoring the extra 3-digit block)
|
Matches |
GB 123 4567 89|123456789 123|GD 123|HA123
|
Non-Matches |
GB 123 4567 97|HA 1234|GB 1234567890
|
Author |
Rating:
Rob Clayton
|
Displaying page
of
pages;
Items to