United Kingdom
Validate tax registration numbers as per United Kingdom's validation rule. All businesses in United Kingdom are assigned a global unique identifier called United Kingdom GB VAT.
Ensure that the following details are correct for United Kingdom GB VAT:
-
Country Code: GB
-
Validation Type: ORA_GB_VAT
-
Description: United Kingdom GB VAT
-
Number of digits: 5, 9, 12
-
Format:
Two character Country code(GB) + 3/7/10 digit numeric
GB999 / GB9999999 / GB9999999999
Two character Country code then 123 / 1234567 / 1234567891 (3/7/10 characters)
Government Department/Health Authority 7 characters: A(1-4)+ N(1-3)
Standard 11 Character: A(1-2)+ N(1-9)
Commercial Group 12 Characters: A(1-2)+ N(1-10)
Isle of Man (Normal) 14 Characters: A(1-2)+N(1-12)
Isle of Man (Commercial Group) 15 Characters: A(1-2)+N(1-12)
A(1-2) = {GB}
-
Check digits: Yes, last digit
-
Check Digit Validation:
11 , or 12 Characters: S=8*N(1)+7*N(2)+6*N(3)+5*N(4)+4*N(5)+3*N(6)+2*N(7) if S%97= N(8-9) then correct
14 , or 15 Characters: S=8*N(4)+7*N(5)+6*N(6)+5*N(7)+4*N(8)+3*N(9)+2*N(10) if S%97= N(11-12) then correct
-
Default Validation: ORA_GB_VAT
Example:
Good:
-
GBGD123
-
GBHA567
-
GB391313073
-
GB417258843
-
GB940068928
-
GB1234567823
-
GB001123456782
-
GB0011234567823
Bad:
-
GCHA567 (Invalid country code)
-
HA567 (Missing country code)
-
GB12345678 (Invalid format - too short)
-
GB0011234567823 (Invalid format - too long)
-
GB123456781 (Invalid check digit)